Remove-ADComputer for remote server on a different domain
Hi I'm trying to delete the "testserver" AD object via PowerShell. This works if the "testserver" is on the same domain as my laptop where I'm running my script from (dmn1.contoso.local). However, if the "testserver" is on…
Cant set-location to NAS drive or get-childitem using powershell
Hi I have Netgear STORA attached to surfacePro4 using a USB to ethernet adapter. I can ping successfully to the location \stora using both powershell and command prompt. z: has been assigned to the required location on the stora I can use DIR to…
Reading "exit code [0]" from a log file in powershell
When an installation is successful the last line in the log file shows "exit code [0]" . I want to read that line using my script and get the result. I am able to read just the string "exit code" but its not able to read…
Undo changes made in 'for developers'
Hi, In settings under 'For Developers' section, PowerShell and Remote Desktop have all options/items selected. Apply was clicked on both of those now no changes can be made (writing has gone grey). By clicking apply did I make changes to my computer or…
Powershell script does not execute when being run in a folder with special character, for example C:\Test'1. If I run the powershell command from there, there is no issue, but executing the ps1 does not work.
Powershell script does not execute when being run in a folder with special character, for example C:\Test'1. If I run the powershell command from there, there is no issue, but executing the ps1 does not work. I tried it with multiple type of script,…
New Registry Path with Long Name
Hi All I am trying to add a new registry key which contains a very long value. I can create the registry key : New-Item "HKLM:SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\Test1.com" I am trying to add…
match a value in an array
Hi, I've got this script that tells me if a value exits in groups.name now I want it to tell me when it doesn't exist. ForEach($asset in $currentFlexAssets.data.attributes.name) { ForEach($group in $groups.Name) …
Powershell - how to interrogate Windows Index file
On my W10 desktop I have about 3000 mp3 files in folders organised by Genre. I would like to mirror all the files which have a Rating of >3 to my NAS which runs a media server. I understand that because mp3 files are compressed it would not be…
Bad_syst_config_info
Recently received stop code with error message bad system config info The screen started what seems to be called blue death screen loop with restarts . I managed to get to advanced options screen but I can’t get any further . For some reason there is…
syntax error
Hi All i am using the below query but still i am getting in output IT manager which i am not supposed to, experts guide me …
"Deny this user permissions to log on to remote desktop session host server" - Powershell command
HI Guys, I'm looking for Powershell command to Enable/Disable the "Deny this user permissions to log on to remote desktop session host server" on user object. Not able to find the correct attribute. can anyone please help me with…
How to find out untrusted workstations?
I often see the following error “The trust relationship between this workstation and the primary domain failed” How can i find out these error workstations by powershell or other script? …
New-Item fails on "Policies" hive with access denied
It seems I can't write under policies, but directy I can. I need to alter something in registery under Policies. Is this doable? New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\System" -Force New-ItemProperty -Path…
Delete AD Group/Members
Hi All I have AD groups in csv file, i want to delete all the members of that groups. Will the below syntax help me. Below is my csv file(there is space between Group and 01) GroupName Group 01 Group 02 Group 03 $groups=import-csv…
Make non-editable ComboBox in Powershell
So I'm writing a GUI that will interface with 3D printers. I'm still fairly new to Powershell in general. Here is what I have in my code right now: # == Baudrate Combo Box == # $comboBox1 = New-Object System.Windows.Forms.ComboBox …