Understanding/processing a string returned in Powershell from the Excel...
I'm using Invoke-Method to retrieve a named range from an Excel file on Sharepoint like such,$data = Invoke-RESTmethod -uri...
View ArticleIssue with wildcard search in get-adcomputer
I am trying to perform a search for computers in my domain that end with lab## (ex/ lab02, lab03, etc) and I am having issues getting the filter to work. I can run the filter asget-adcomputer...
View ArticleNeed to add a warning for FreeSpace under 10GB
I need this code to place a new column in the output. If FreeGB is less than or equal to 10 I want to display an '*' next to the row on the right. Can somone help me with this? I got this code from...
View ArticleEvaluating string with embedded escape characters...
I must be missing something basic. I'm trying to evaluate a string (received from a SQL call) that contains PowerShell escaped characters. How do I evaluate them? For example, if the embedded...
View ArticleEdit a web.config file with powershell
I am wanting to update the web.config that is installed with out application using powershellhow can I achieve this?
View Articlescript to remove logon scripts from AD profile
i'm looking for a powershell script to remove logon scripts (scriptPath attribute) from all user profiles in a given OU (and its child OUs). thanks in advance.
View ArticleExchange Online - Control of ActiveSync Feature via AD Group
HiI am trying to get a script which simply sets Activesync off for all Office 365 Exchange Onlinemailboxes except for users who are members of an AD group on our domain. So it should be a simple "if...
View ArticleScript to reset session RDP
I currently use the following to release sessions on my server. net use \\win2008server /user:myname qwinsta /server:win2008server reset session 1 /server:win2008server I would like to have a script...
View ArticleFind and replace data
Hi, I am using PowerShell to report on an SQL DB which works fine. However 1 particular value in the SQL table needs changing, this value is the computer MAC address (for example 00-11-22-33-44-55-66)....
View ArticlePowerShell Script Error. Please help!!!
Hello. I'm working on a script to disable user accounts and part of it includes a mail forward. I keep receiving this error though and I'm not sure why so any help would be greatly appreciated....
View ArticleRegex help- Extracting info from txt file
Hello!I have this info:Bears1 Bears2 Apple1: Bears3 Bears4 Apple2 Apple3 Apple4: Bears5 Apple5: Bears6 I would like to extract just the info where it says : Bears1 Bears2 Bears4Not anything with...
View ArticleDo until loop not ending as it should!
Hi I'm new to this so please bear with me! We have a vm with a legacy adapter and a virtual adapter. We have an issue where the legacy adapter comes up before the virtual adapter. We need a script that...
View ArticlePowershell: Invoke-Command getting error help please
Hello,PS Script: $Password = "<Password>" $pass = ConvertTo-SecureString -AsPlainText $Password -Force $server="<ServerName>" $credential = new-object -typename...
View ArticlePS Script only works in ISE - Creating Scheduled Task
$folder = 'd:\sharesroot\008-upload-stuff-here\' $filter = '*.*' $fsw = New-Object IO.FileSystemWatcher $folder, $filter -Property @{IncludeSubdirectories =...
View ArticlePowershell script to set the Computer Description field in AD to the display...
I would like to create a Powershell script to set the Computer Description field in AD to the display name - office number of the last person to login to a computer. I've taken a couple posted ps...
View Articlelast executed script has not yet been executed however delete gpo still work
Dear alli have AD 2008 i have serious problem when i am adding new gpo it does not applied however deleted gpo still work on clients however i made milion time on server gpupdate and clients restart...
View ArticleHow to compare 2 Multi-Dimensional arrays (Hotfix -> Servers)
I'm currently reading an internal web site which contains Hotfix (kb#), OS version to be applied on each server, which are then stored into a file.I would like to query over 500 servers save the...
View ArticlePowershell Script error: "Missing expression after unary operator '-'.
Here is my Script. I can not! For the life of me, where the error is failing.....Import-CSV "C:\test2.csv" | ForEach-Object -Begin Set-User -Title $_.Title -Department $_.Department -OtherTelephone...
View Articlehow to deal with specific formatted content ?
Hello everyone,I am trying to use a text file that comes from a router. it contains information that is presented this way:a lot of lines that won't be used by the script! ! ephone number label...
View ArticleRemote Query PS1
Hello,I hope someone can help, i would like a powershell script to prompt for user to input the computer name and use that as the computer name parameter for the rest of the script.The script simply...
View Article