Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Parsing results after calling PowerShell Invoke-RestMethod

Hi all, Hoping someone can help as I am stuck on this for a couple of days now - I am calling a REST api for a vendor's service using the Invoke-RestMethod cmdlet. I was wondering : - How can I...

View Article


Import-csv exclusions

Hello, I'm using this construction for getting all users except the ones in the exclusion filter$Exclude = @( 'user1' 'user2' ) $filter = ($Exclude | foreach {'(Name -ne ' + "'$_')"}) -join ' -and '...

View Article


The file \\Server\ps.ps1 is not digitally signed. The script will not execute...

System.Management.Automation.CmdletInvocationException: File \\Server\ps.ps1 cannot be loaded. The file \\Server\ps.ps1 is not digitally signed. The script will not execute on the system. For more...

View Article

Working powershell script won't run as scheduled task (Windows IOT - RPI 3)

Guys here is problem. We want to make our app to upgrade automatically. Since Windows IOT doesn't have Windows Store we have to do it manually.Here is our solution. Our app checks every 7 days if there...

View Article

PowerShell performance problems on Server 2008 machines Virtual and Physical

I Googled a solution for this all day yesterday and didn't find anything that helped.  So here is the scenario: We have a PS script running on Server 2008 R2 that someone reported was taking a long...

View Article


script to find users from multiple security groups

Hi team,I have about 300 security groups that I need to get the members of into a csv/xls.All the group names contain the words "VPN User".I need to get membership for all such group, so is there some...

View Article

Powershell Script With Some Logic - Zip and Copy Files

I need a Powershell Script to do the following:Take a file that is more than 7 days older than the current date, zip it and move the zip to a share.  Then delete the log file from the source drive....

View Article

Custom provider Get-Item() : How do I format output in a custom provider

I'm starting to write my first custom provider. All the examples I found use WriteItemObject() to display data to user.  The output appears to display all public property names : Value e.g.PSPath :...

View Article


Need to delete a file from folder which is sample_YYYYMM.zip file.

Could any one help me with the below code which i have tried. We are new to powershell.  $Path = "E:\backup" $ZipTimestamp = Get-Date -format YYYYMM; $MonthsBack = "-12" $CurrentMonth = Get-Date.Month...

View Article


NavigationCmdletProvider: What is life-cycle of "*". E.g. ls *

Is there examples or doc on how to handle "*" in a navigation cmdlet provider?e.gcd <ProviderDrive>:ls *I'm baffled what should be returned in by GetChildNames() and/or GetParentPath().I played...

View Article

Trying to copy a file which is older than 5 months

I need to copy a file from one folder to another which is 5 months older it should be copied to destination folder. For example the file is in sep'14 and we need to copy that file to destination folder...

View Article

Powershell - Custom Tracert

Tracert output:  1     4 ms     5 ms     3 ms  192.168.32.254  2    <1 ms    <1 ms    <1 ms  192.168.39.238  3     1 ms     1 ms     1 ms  10.88.8.122  4     2 ms     2 ms     1 ms...

View Article

Error "remote client exceeded allowed maximum"

Hi, I'd like to start all three scripts from this web page, like this one:Get-Mailbox -ResultSize Unlimited | Get-AdPermission | ?{($_.user -like "*user*") -and ($_.IsInherited -eq $false)} | select...

View Article


How can I set the PowerShell console background color (not the text...

I'd like to set the background color of the PowerShell console window.The only code examples I've found so far do change the text background color, which looks very untidy when mixed with the...

View Article

Output DNS Duplicates - Include Name, IP, TimeStamp, RecordType

Hi. I came across this powershell script and would like to modify to include TimeStamp + RecordType values.I tried adding additional columns. The column headings output but no values so I guess I did...

View Article


Run Test-ADServiceAccount at remote machine

I am getting error at windows server 2012. Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services...

View Article

Search & Replace in Files Listed in Column C

Hi powershell friends, I am having no luck sorting this problem out. :( I have a CSV file Set Out Like this FindString    ____ReplaceString____FileName X1_____________123_____________1.txt...

View Article


Need the syntax for c drive free percentage on servers - Using power shell

Hi Friends, I could find some ps script with gui option for server health check. It has its grid view and displays server parameters like uptime, last boottime, Service pack etc. So I was trying to...

View Article

Enter-PSSession errorcode 0x80090322

HiI've got this ugly error "errorcode 0x80090322" when accessing one specific remote system:Enter-PSSession : Connecting to remote server myserver failed with the following error message : WinRM cannot...

View Article

Add digital signature to multiple files

Hi I have about 500 word documents. I managed script to convert them to PDF, but i also need to sign them with digital signature. Is there any way how I can manage this with powershell ??Thanks

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>