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

Signing Powershell Script Returns and "UnknownError" Status

I am trying to self sign some scripts  but keep getting a status of "UnknownError" after the script completes successfully. The strange part is, the script does complete and sign the certs, it just...

View Article


List users in OU - Not Expired and Not Enabled

Hi I am currently doing a full audit on our AD environment and need reporting back all user accounts that are live within each site OU we have, that meet the following criteria -Not Disabled -Not...

View Article


Can see values from parsed JSON object, but they present as null on PSv2

Code:[System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") | out-null $web_client = new-object system.net.webclient $npi="randomNPInumberfromNPPES" $jsondownload =...

View Article

Failover Clustering - File Share Witness - Policies

Hi,I'm currently trying to automate some parts of a clustered build and I need to be able to modify the File Share Witness - Policies within PowerShell, can anybody point me in the right direction of...

View Article

Getting Error while running Get-DscConfiguration in Windows Server 2008 R2

Hi ,I am trying to run "Get-DscConfiguration -Verbose" in server 2008 R2 in order to upload the output of it Pull Server using POST method. But I am getting following error :Get-DscConfiguration :...

View Article


Show PSComputerName in a one-liner

Is there a way to include the PSComputerName, which is collected early on in the pipeline, to the final out of this one-liner?Get-CimInstance Win32_Process -Filter "Name = 'iexplore.exe'" -ComputerName...

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

Trying to use Get-Mailbox

I am trying to get a script that prompts the user to enter a username to search, and then returns with the name, how much storage they have used, and all the quotas set for that user. But I am having...

View Article


Unicode \u2019 error

Hi, I am running a cURL to return data. I am getting a txt file that I then translate in to CSV by using this function:$xslt = New-Object System.Xml.Xsl.XslCompiledTransform; $xslt.Load($xsl);...

View Article


PowerShell 3: Can't execute scripts from Windows Explorer context menu

After updating PowerShell to v3 on my Windows Server 2008 R2 machine I don't seem to be able to run PowerShell scripts from the "Run with PowerShell" context menu item of Windows Explorer for my .ps1...

View Article

Write-DFSRHealthReport not working for "Domain System Volume" (SYSVOL)

Hello all,I'm trying to figure out how to check the DFSR Health of our SYSVOL folder, but theWrite-DFSRHealthReport doesn't seem to work with the Replication Group "Domain System Volume", which is...

View Article

GetResponse with "0" argument(s): "The operation has timed out

I have created a job that opens a webpage on our internal LAN. The webpage takes 4 to 5 minutes to complete it's process which is expected so I set a high timeout of 10 minutes. The powershell job...

View Article

Dynamic Log File Upload

Hi Folks,I have a powershell script that uploads log files created yesterday to AWS S3 storage, it then deletes all files older than 1 month.The issue is there are new services added weekly so it is...

View Article


Calling multiple WmiObject classes; appending results to a single string?

Hi Everyone,How can I call multiple classes and return the results to a single string?E.G. If I have:$CompInfo = Get-WmiObject -Class Win32_ComputerSystem -computername $computer | Select-Object Name,...

View Article

Need help on a script i created to provision host name based site collection.

I created a script which provisions a host name based site collection. The issue is when it creates the site collection, it gives it a url as ($webappurl +$sitecollection.url) ie if the web application...

View Article


Offce 365: Assigning calendar permissions via security groups/bulk calendar...

I originally posted this in the 365 forums but was informed to post it here instead...I'm looking for a way to do bulk calendar sharing of individual calendars (not Public Folders) in Exchange Online....

View Article

Wndows Task Scheduler Not Executing PS Script

Hi I have a script which reads files from a network path and uploads to sharepoint library and then moves to another archive folder.It works fine if I run it manuallyWhen I schedule it, in the task...

View Article


Sharepoint batch delete from cvs file Powershell script not working

Hi,I'm trying to use a Powershell script to check if a SharePoint list contains items from a cvs file. If there is a match the script should delete the item from the SharePoint list and move on to the...

View Article

How to move bulk AD Groups between OU's

Hi Everyone,I would like to move over 50 AD Groups between OU's and stamp the notes box with a comment. I am having trouble with the move to start of, this is the script I found:$Move=import-csv...

View Article

Error "Unable to connect to the remote server" when executed...

Hi there,I am trying to capture .csv file from REST call. For that I have used Invoke-WebRequest cmdlet. The exact command is as follows:>>Invoke-WebRequest $url -OutFile $cosmos11_Path...

View Article
Browsing all 21975 articles
Browse latest View live


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