Powershell in Jenkins Pipeline
Hello everybody,I have created a Jenkins pipeline to run a powershell script (seperated script), but i am not able to use the jenkins parameters within my script!! Moreover, it is a pipeline not a...
View ArticleHow to get list of available windows update?
I have been trying to write powershell script.is there any command or script tells me list of available updates? Not installationreporting tool just generates list of available updates on each servers
View Articlesingle line string update in a file without changing the rest of the content
I have some hundreds of files where I need to modify only first line of each file and replace last 6 characters with a fixed value '20181231'. The following code is actually doing the string replace...
View ArticleHow to use Power Shell to Auto add information in AD group?
Hi guys,How to auto import information in AD group "Manage by" for Power Shell script?If I add one csv file and include informationCan I use Power Shell script to import this csv to auto add...
View ArticleIssue while editing appsettings.config file key and set the new value
Below is the code I am using and the error I am getting. Please advise and help.Likewise I need to edit 2 more keys for timeout increase , please help on those ways of doing.Code: $ConfigFile =...
View Articleinsufficient memory to continue the execution of the program
I created a script that gets the drivespace usage from 30 servers on the network and right before the script finishes running I get the following error:=Error=Get-WmiObject : Insufficient memory to...
View Articlesetinfo() -> The specified directory service attribute or value does not...
I would like to determine the wrong ATTRIBUTE NAME from the exception object (I would like to log the error...)try { $Searcher = New-Object -TypeName System.DirectoryServices.DirectorySearcher ......
View ArticleKSK-Primary keys of DNSSEC enabled zone
HiHow to get the KSK-Primary keys of DNSSEC enabled zone through powershell commands? If not poweshell commands do we have any other way to get the private keys?Thanks,TejaShetty
View Articlesetinfo(); The specified directory service attribute or value does not exist.
I would like to determine the wrong ATTRIBUTE NAME from the exception object (I would like to log the error...)try { $Searcher = New-Object -TypeName System.DirectoryServices.DirectorySearcher ......
View ArticleIssue in Import-PSSession
Hi everyone,I try to figure a very weird result coming from a cmdlet. This is what i got :If I do that :Import-PSSession -Session $SessionCommand -AllowClobber -DisableNameChecking -CommandName...
View ArticleTrying to Query Servers for Guest Account Status From Text File Using Invoke...
$cred = Get-Credential asgard\thor $PSSesh = New-PSSession -Credential $cred $Servers = "C:\downloads\computers.txt" ForEach ($Server in $Servers) { Invoke-Command -ComputerName $Server -Credential...
View ArticleUpdate user's AD properties according to CSV given by ADP?
Hello,I have to write a PS script to update AD users' managers, job titles and description based on the employeeID value because that is the only unique value from ADP data.The CSV comes in this...
View ArticleAdding to wWWHomePage field in AD
I am trying to figure out why when adding a date to the wWWHomePage field in it works on some accounts and not others. Tested on win 7 and 10, some users when running script won't enter in information....
View ArticleJEA Calling Scheduled Task in a Script now fails
Hi,It looks like one of the security patches has knocked out JEA from running an allowed script unconstrained by a constrained user.I'm getting back the following error:An error has occurred while...
View ArticleDeleting X number of days old files through powershell script
Hi All,I am trying to delete X number of old files through powershell script but in few directories it is prompted with below notification if click yes it will clean all file including latest one also...
View ArticleFile's ShortName property is not an 8.3 file name
I'm able to convert the file's path to an 8.3 path, but I cannot convert the file name. Here's what I'm doing: Write-Log -Message " " -LogType Legacy -LogFileDirectory $ConfigToolkitLogDir...
View ArticleTrying to Query Servers for Guest Account Status From Text File Using Invoke...
$cred = Get-Credential asgard\thor $PSSesh = New-PSSession -Credential $cred $Servers = "C:\downloads\computers.txt" ForEach ($Server in $Servers) { Invoke-Command -ComputerName $Server -Credential...
View ArticleGet-WinSystemLocale not recognized
Hello,The application team that I support is attempting to install software on to a Windows 2008 R2 server. One of the pre-requisites for the software is that it needs to be able to run...
View ArticleHow to run this script on a remote computer
Hi All , I'm trying to fix SCCM client issue " client in provision mode" on a remote computer and i found a script that can help me do that. the problem i don't knonw how to run it from my PC to a...
View ArticleUnhandled Exception: System.FormatException->Powershell calling remote batch...
I have a powershell command in a SQL job to call a remote batch file.$sess=New-PSSession -ComputerName 'STVANFSS02.fnha.local' ; invoke-command -scriptblock...
View Article