An interactive shell, scripting and programming language, and surrounding environment from Microsoft. Commonly used by system administrators managing Microsoft software (including Windows, Exchange, SharePoint, and cloud services Azure and Office 365), PowerShell is included by default with Windows, ...

learn more… | top users | synonyms (1)

0
votes
1answer
81 views

Is it possible to execute Azure automation runbook on Visual Studio?

I am considering about two cases. One is edit runbooks on Visual Studio, then execute them to perform Automation task directly. Another one is that edit runbooks on Visual Studio, then I use ...
4
votes
1answer
3k views

Powershell ActiveDirectory-Module on SBS-2008?

I read plenty of tutorials that describe how to install ADWS (ActiveDirectory Webservices) and Powershell. But I never saw any hint about installing ADWS on a SBS-2008 in order to work with Powershell ...
0
votes
1answer
83 views

PowerShell script generates lots of warnings in Windows Event Log

I have a - rather complex - PowerShell script running on a Windows Server 2008 R2. When executing the script in the ISE or also in the console, everything runs fine. No errors or anything else that ...
0
votes
2answers
40 views

Unable to Run Get-WindowsFeature

I have a Windows 2012 instance running in the Amazon cloud. It's just a test server for an asp.net project and only has the necessary features installed. The problem is the instances is out of disk ...
0
votes
2answers
50 views

using powershell ; from a given location a of folder i want to validate and show the number of specific filetypes respective folder

Using powershell from a given location a of folder I want to validate and show the number of specific filetypes respective folder. I tried using the command to count the number of files in a folder I ...
0
votes
1answer
42 views

AAD Sync not able to connect to online service using powershell

When trying to connect to my Office 365 tenant using connect-msolservice from powershell I get the following error: Connect-MsolService : The HTTP request was forbidden with client authentication ...
0
votes
1answer
871 views

How to export Exchange public folder permissions and import them to a different system?

I'm involved in a migration from Exchange 2010 to Office 365 (Exchange 2013); all user mailboxes have already been successfully migrated, but due to some glitch or bug that even Microsoft's support ...
1
vote
1answer
858 views

Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps'

I've tried re-installing SQL Server 2014 and I'm still getting the following error message when trying to import-module sqlps. The same registry key exists but is appended with 120. I'm able to use ...
4
votes
1answer
99 views

Execute Powershell Add-Computer remotely via Invoke-Command

Scenario: When executed locally on the Azure VM, succesfully adds the machine to the AD, and restarts. $DomainName = "test.local" $AdminUserName = "sysadmin" $Password = <mypass> ...
0
votes
2answers
4k views

Can I use Powershell to configure Local group policy settings in windows server 2008 r2

in Windows server 2008 r2 , for this manual process open run >gpedit.msc > computer configuration > windows templates > windows update > specify intranet microsoft update service location > ...
40
votes
7answers
37k views

How do I diff two text files in Windows Powershell?

I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't ...
0
votes
0answers
26 views

Powershell - Printer settings not applying

I'm currently trying to script settings for a printer connected through a local network, a normal TCP/IP-printer setup if you will. Since I'm on my phone I don't have access to the code right now, ...
0
votes
1answer
62 views

Can I use Powershell script on Win8 machine to copy files from xxx.sharepoint.com?

I am confused if my request is possible. The company I work for uses Office 365 and they gave us Sharepoint. We access SP by going to xxx.sharepoint.com on the Internet. I am thinking of writing a ...
4
votes
1answer
280 views

Cannot connect to Office 365 with PowerShell

I want to connect to Office 365 through powershell, referring to the tutorials a very simple task. But apparently not for me. I think I missed a simple but important trivia. Some info: license is ...
3
votes
3answers
2k views

power shell error: Cannot bind parameter

when i am trying to execute the below PowerShell command, i got error . The command : *PS cert:\currentuser\authroot> gci | where subject -like "UTN"* The error is below : Where-Object : Cannot ...
2
votes
3answers
2k views

Office365 how to recover entire dumpster

I need to recover an entire deleteditem aka dumpster folder. Using Get-MailboxStatistics User@Domain.com | Select *Deleted* I am able to see 2.2+GB of data = 9,700+ emails. How can I recover all of ...
1
vote
1answer
76 views

Transfer files via Powershell Remoting (like scp in linux)

During the creation of a few powershell-based deployment scripts, I sorely missed an easy way to quickly transfer a file to another server (over the internet) via Powershell Remoting, something like ...
1
vote
4answers
5k views

How to add a firewall rule with PowerShell?

I made a very simple script to enable Remote Desktop connections on a computer: # Allow Remote Desktop connections (Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace ...
4
votes
1answer
692 views

Batch script is not getting executed when called by Start-Process Cmdlet

I have a strange issue on a Windows Server 2012 R2 here that just does not make any sense to me at all. I've got a PowerShell script that basically has the following structure: Function ...
1
vote
1answer
647 views

PowerShell ftp get won't save on Windows Server

From a Windows Server 2012, using PoweShell, I connect to a remote device through ftp and run get to retrieve a file. The process goes through with no problems but the file doesn't get saved on to my ...
1
vote
0answers
25 views

Powershell IIS plugin - cmdlets not working

I'm pretty much a novice at Powershell so bear with my noobness. I'm specifically trying to run the "Get-WebBinding" cmdlet (which I have successfully run on some of my other servers) Windows Server ...
0
votes
1answer
41 views

Trouble with embedding html email with PowerCLI/Powershell for gmail

I am new to Powershell, I am a junior admin for a VMware environment. I am trying to automate a weekly report for snapshots in PowerCli. I am making the script in Powershell. I have made a simple ...
0
votes
2answers
36 views

How do you edit a Powershell script to continue on an error?

I modified this script(https://gallery.technet.microsoft.com/scriptcenter/Create-HTML-Uptime-and-68e6acc0) to hit multiple servers, but it doesn't generate a report even if only one of the systems are ...
2
votes
4answers
2k views

PowerShell Import DnsShell Module

So here's the list of available modules in this directory. As you can see DnsShell is there. PS C:\windows\system32> Get-Module -ListAvailable Directory: ...
16
votes
6answers
9k views

Retrieve current domain user's full name

Using PowerShell, how can I get the currently logged on domain user's full name (not only its username) without the need of the ActiveDirectory module?
1
vote
1answer
1k views

Exception Enumerating SQL Server Instances with SMO WMI ManagedComputer

I'm trying to use the SMO WMI API/objects in PowerShell 2.0 on Windows 7 with SQL Server 2008 R2 installed to get a list of SQL Server instances on the local computer using the Managed Comuter object. ...
2
votes
1answer
6k views

How to select a user and remove all groups they are a member of using Powershell (with Quest)?

I've read quite a bit online about this and thought I had found a solution, but it doesn't seem to be working like I would expect. I am wanting to get a user based on the username I input, then ...
4
votes
3answers
5k views

Windows Server 2008 R2 PowerShell script runs manually, but not as a scheduled task

I have a PowerShell script that runs manually using the PowerShell ISE. However, when run as a scheduled task using an administrator's credentials the task does not run with the expected results. The ...
1
vote
2answers
1k views

Power shell script to fetch disk space on all servers in timely intervals

I got a Powershell script from here which will export Disk Space usage to html file. I want the scritp to give usage in timely intervals say each 15 mins or 30 mins. is there any way we can mod this ...
3
votes
1answer
2k views

How can I run a PowerShell script during the specialize pass of a WDS deploy?

I'm setting up Windows Deployment Services (WDS) for Windows Server 2012 unattended deployments using the default boot.wim file found on the install media. I have a PowerShell script that performs ...
0
votes
1answer
1k views

Exchange 2010 Search-Mailbox to delete Exchange Journal emails

I am using this PowerShell command to try and delete emails from our Exchange Journal, [PS] C:\Windows\system32>Search-Mailbox -Identity exchangejournal -SearchQuery ...
1
vote
0answers
33 views

Create shared folder on share automatically

I know there is a group policy where I can map a specific share. What if I want the group policy to create a folder on that share and map it during log on? I know there must be a way to do this in ...
0
votes
0answers
23 views

Access denied on service password change [duplicate]

This works if I change the password manually but I get an access denied message. I think it might be how I am trying to do it. #Service Credential Change -Multi #This script allows us to input a ...
1
vote
0answers
31 views

PowerCLI automation set-cddrive error

When attempting to change ISOs on a powered on guest instance, set-cddrive is returning an error but completing the command. A couple different commands produce the same result: $theVM | Get-CDDrive ...
5
votes
2answers
2k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
1
vote
2answers
2k views

powershell v2 remoting - How do you enable unecrypted traffic

I'm writing a powershell v2 script that I'd like to run against a remote server. When I run it, I get the error : Connecting to remote server failed with the following error message : The ...
3
votes
1answer
30 views

Exchange 2013: Weekly Message Count

I have a manager needing to check on an employees sent and received message count as the employee is stating they are getting too much mail compared to others in the company. I've been checking ...
1
vote
2answers
132 views

Access already mapped network drive in PowerShell

I am running a Windows Server 2012 installation inside VMWare Workstation. I have shared folders enabled, so drive Z: is mapped to \\vmware-host. I can correctly access this drive in Explorer (I can ...
0
votes
1answer
80 views

Reflect HKLM registry changes to HKCU

Ok so I have a Local Group Policy (under Computer Config, not User Config) to force install extensions in Chrome. This policy needs to run for every user of the computer. The value is going to change ...
0
votes
0answers
46 views

Can't log into Exchange Management Shell and EAC in Exchange 2013 via Server 2012 R2

I'm not sure why but I my Exchange PowerShell can't log into my Exchange server and I can't access the EAC via localhost or the URL. I did notice that I enabled HTTP Proxy in IIS and that I used ...
1
vote
0answers
109 views

Powershell-Script is not exectued correctly

I have a power-shell-script which is called by a batch-file. The batch calls the script after it has set the execution policy to unrestricted. Currently the script does nothing more than writing a ...
0
votes
2answers
2k views

Powershell - check if all users in a specific OU are disabled, disable if not

I tried to search for it but I didn't find anything. Could someone help me out with an example of a script that would do this?
16
votes
1answer
2k views

Sometimes PowerShell stops sending output until I press enter. Why?

Periodically I notice PowerShell seems to take forever to finish doing whatever it is I told it to do until it occurs to me to "wake it up" by pressing enter. This is not the fault of any one process ...
5
votes
3answers
4k views

How do I diff two folders in Windows Powershell?

I'm trying to find differences in the content of two folder structures using Windows Powershell. I have used the following method to ensure that the file names are the same, but this method does not ...
1
vote
2answers
259 views

Disable NIC advanced properties in Windows server 2008/2012

I have some Rackspace VM's and need to disable these advanced NIC properties: Correct TCP/UDP checksum value IPv4 checksum offload Large receive offload Large send offload version 2 TCP checksum ...
4
votes
2answers
456 views

WinRM listener is not all ears

This is what happens when I try and connect to Powershell on my remote machine: PS C:\Users\Jonathan> Test-WSMan -ComputerName 54.228.XX.XX Test-WSMan : The WinRM client cannot complete the ...
4
votes
1answer
182 views

Search-ADAccount :: Finding Inactive, Disabled or Expired Accounts

The Search-ADAccount cmdlet has switches -AccountDisabled, -AccountExpired and -AccountInactive; the results of which may not be mutually exclusive nor inclusive. i.e. an account which was disabled ...
2
votes
0answers
42 views

Viewing Storage Space allocation for physical disk

I have a server that had four disks (2x 4TB and 2x 3TB drives) in a Server 2012 R2 Storage Pool. There are two virtual disks in the pool - a parity disk and a mirrored disk. The idea was to add two ...
1
vote
3answers
7k views

Using Powershell's Invoke-command to install .exe on remote computer

I have an .exe I would like to install on a large farm of Windows Server 2008 computers. I am attempting to use Powershell remoting. I have this command which works locally: invoke-command {& ...
2
votes
2answers
1k views

My PowerShell script won't save to file when running using Task Scheduler; do I need to specify a specific argument?

I have a script that downloads a temporary Excel file, copies parts of it to a new file, and saves it to a specific location on the network. The problem is that the new file is never created/saved. ...