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
182 views

PowerShell 'get-ClusterQuorum' output is not showing 'QuorumType' column

PowerShell cmdlet get-ClusterQuorum output is not showing QuorumType column. Has anybody seen this before?
1
vote
1answer
1k views

Looking for a powershell script that can pull a file from a set of PC's and FTP

I'm looking to write a script (preferably powershell) that will essentially copy a file from a bunch of PC's and FTP it to a server. So the structure of the environment is that we have a file on ...
1
vote
2answers
724 views

Modify CIFS share ACL's

I would like to modify permissions on a number of NetApp CIFS shares (over 100). These are user shares and each share has a different user with "Change" share permission, this permission now needs to ...
4
votes
1answer
6k views

How to catch Exceptions with PowerShell

I am getting this error. Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) At F:\Code\powershell\network_shutdown\TurnNetworkOff.ps1:19 char:26 + ...
-2
votes
1answer
7k views

powershell script that outputs date of the day as a file name

I have a script which lists local admins of all hosts in Active Directory below: $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"") $Searcher.Filter = "(objectClass=computer)" ...
2
votes
1answer
1k views

How to start a runbook using web service call to SC Orchestrator in Powershell?

I have System Center Orchestrator 2012 R2 and I want to start a Runbook on the runbook server by calling the web service. The orchestrator console works fine if I browse to it like so: ...
3
votes
2answers
1k views

Format disk with diskpart if not formatted

I'm trying to write a script to create and format a partition in Windows Server 2008R2. Now, when disk 1 is selected, I need to format it, only if it is not formatted already. This is what I have ...
3
votes
1answer
2k views

I am getting Invalid class errors for my PowerShell script

When I run this script, I get this error Get-WmiObject : Invalid class “Msvm_ImageManagementService” and Get-WmiObject : Invalid class "MSPower_DeviceEnable" and Get-WmiObject : Invalid class ...
2
votes
1answer
2k views

PowerShell startup script applied via GPO failing ambiguously

Script: $folder = "$env:HOMEDRIVE\TestFolder" New-Item -ItemType directory -Path $folder note that the same group policy error occurs when $folder is set to "C:\..." Execution policy is ...
-1
votes
1answer
535 views

Top level files size with powershell

I have the following script it does what I want, but only for one drive (that I have to specify), and on the server I am running it on. I want to be able to do this for every disk in my server and ...
9
votes
1answer
671 views

Small issue with the Domain Name System (DNS) Server Cmdlets

I'm wondering if I need to clear some cache or something with the issue I'm having. I'm trying to remove A records from a DNS Zone and replacing them with a CName record that has the same host name. ...
0
votes
1answer
757 views

Automate app pool recycling of an Azure Cloud Service Web Role

How can I script (e.g. using PowerShell) the action to recycle the app pool of a web site hosted in a Web Role on Azure Cloud Services? Only one instance of the cloud service is running (used for ...
0
votes
1answer
2k views

robocopy says its receiving invalid parameters in when used in powershell script

I'm attempting to use robocopy in a PowerShell script, but currently failing. When I run the following command manually robocopy \\corporatesystem00.local.com\C$\Maven\ ...
2
votes
1answer
1k views

Force active directory replication after joining a server to a domain?

I'm trying to create more 'self-service' virtual machines for the developers to use. On of the requirements is after running a script to bootstrap the machine and join it to the domain, that the ...
3
votes
1answer
1k views

Strange format-list behavior in this PowerShell script

I have a weird behavior with format-list. When I paste the following code directly into the shell - everything works like a charm: @("Administrator","SomeUser","SomeOtherUser") |% { ...
0
votes
1answer
348 views

What is the upper limit (maximum limit ) of WinRM MaxShellsPerUser

For executing the remote powershell commands i need to configure WsMan, In WsMan MaxShellsPerUser specifies the maximum number of concurrent shells that any user can remotely open on the same ...
0
votes
1answer
96 views

Extract Summary property from VMM with PowerShell

I have a Windows Server 2008R2 running SCVMM 2012. I successfully removed a virtual machine, according to the Jobs output from VMM, as seen in this screenshot. As you can see, the VM has a red ...
2
votes
0answers
93 views

Set CMTrace Font

Might be a bit of a long shot but I was wondering if anyone knew of, or could speculate on, a way to change the default font of CMTrace. It seems to use some Sans-Serif font. I'd like to change it to ...
2
votes
0answers
130 views

Powershell command providing incomplete list

This PS command is only returning 10 out of 12 groups that the user is member of. Anyone know why that will be? Get-ADUser -Identity username -Properties memberOf | Select -ExpandProperty memberOf ...
2
votes
0answers
329 views

Powershell Install-WindowsFeature Application-Server (and subfeatures) and assign certificate

I want to use a Powershell script to install Application Server on a windows 2012 server. When using the wizard, it prompts for you to select a certificate (for WS-Atomic Transactions) from the local ...
0
votes
3answers
123 views

How do I display a string property?

In the scenario below, how do I use a .NET method to display the pscomputername property, returned by Get-DnsServerForwarder? Get-DnsServerForwarder -ComputerName db3testads001 | gm EnableReordering ...
3
votes
2answers
4k views

In which version of windows is powershell installed by default?

As title says. I just installed XP SP2 and i was expecting to have PowerShell 1.0 installed; however, it isn't. It seems I have to manually install it. If I upgrade to SP3 do I get PowerShell. From ...
3
votes
1answer
149 views

How can I probe an SMB share for unencrypted access?

I am enabling SMB encryption with: Set-SmbServerConfiguration -EncryptData $true -Force From a monitoring service, I want to verify that only encrypted connections are accepted. How can I attempt ...
0
votes
1answer
734 views

Powershell IIS works in command line but not in asp.net

I am trying to run a add-website script via asp.net. Where I want to be able to easily add new websites as an administrator. But I have the issue the command is not recognized. The command line ...
2
votes
2answers
7k views

AD Group and Distribution Group with O365

I have a O365 with Exchange, and a local AD. I want to manage distribution groups and distribution groups members via PS scripts (that will run by scheduled task), that look users' AD attributes ...
4
votes
4answers
6k views

Powershell Get-Process : Couldn't connect to remote machine

Been struggling with this for a couple days now. I'm getting the following error: PS C:\> get-process -ComputerName Win2012r2 get-process : Couldn't connect to remote machine. At line:1 char:1 ...
4
votes
1answer
175 views

My PowerShell $profile path has no $HOME prepended

I have PowerShell installed on two different Server 2008 R2 systems. On one system, $HOME is prepended to $profile, but on the other nothing is prepended: Server 1 (PowerShell 2) PS C:\> echo ...
0
votes
2answers
693 views

How do I check for a specific IP Address, and then change it if it does not exist?

I am trying to test for a specific IP Address and then change it if it is not there in Powershell. I am not sure what is wrong with my code: if($wmi.ipaddress -ne "10.0.0.15") {$wmi = Get-WmiObject ...
1
vote
1answer
391 views

Can I force powershell to ignore mouse input?

I'm running a basic Powershell script on a remote server, and while it's running, it ignores keyboard input completely. This is intended. When, however, you click anywhere in the Powershell window, ...
3
votes
1answer
316 views

Move-Item command only partially succeeding

I'm running a simple script to archive SMDR logs using Windows Server 2008 R2's Task Scheduler. The last line of the script is as follows -- dir c:\smdr -Filter *.txt | where-object {$_.basename -eq ...
1
vote
1answer
54 views

Get-MaskingSet in PowerShell 2.0

I'm trying to retrieve the current masking sets using PowerShell 2.0 on a Windows Server 2008 R2. Unfortunately, the cmdlet Get-MaskingSet does not exist under this PowerShell version. Are there any ...
3
votes
1answer
1k views

Edit local policy via powershell

i'm searching for a way to edit this policy via powershell : Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials with ...
0
votes
1answer
1k views

PowerShell Script to Move ADUser to appropriate group based on its Department ID attribute

I am new to PowerShell and AD, I have a small task which I am finding difficult to complete. Can someone please help me here ? The task is as follows: There are 3 groups defined in AD, namely ...
1
vote
2answers
188 views

PSCX Invoke-BatchFile afterlife

I'm still rather new to PowerShell, so bear with me. Why does the PowerShell console behave wierdly after using the Invoke-BatchFile cmdlet of PSCX? C:\> cd C:\> cd .\Kellekek C:\Kellekek> ...
4
votes
2answers
9k views

How to check if an AD username is already used

Thank you in advance for your help. I found something related at the following link but was unable to find the solution I was looking for through here. Check existance of domain accounts with ...
3
votes
1answer
293 views

Windows Server 2012 R2 Powershell IP Interfaces Compartments

If I run Get-NetIPInterface -ifIndex 29 -IncludeAllCompartments, I get one Interface back. There are only 2 Compartments I checked this via @(Get-NetCompartment).Count. The Compartment IDs are 1 and ...
0
votes
1answer
84 views

Backup SharePoint (2010) documents only

I was wondering if it is possible to backup the files itself from SharePoint 2010 from all hosted sites? I can backup my entire virtual machine and the database, but i'm only interested in the ...
1
vote
0answers
546 views

Calling Physical Path Credentials for Web Applications in IIS

How would I call on the Physical Path credentials property for web applications in IIS using PowerShell? I can't print out the username or password, but I can print the logonMethod which uses the same ...
6
votes
2answers
3k views

How to get robocopy summary information involved in powershell?

I have a quick script written to compare file differences across servers, and then give a prompt for whether to mirror the changes. I'd like it to intelligently NOT prompt for copying if there aren't ...
3
votes
2answers
3k views

Email results of PowerShell Script

I have a powershell script that check the certificate store for expiring certificates. It will display these results within the CLI. I want to modify this script to email the results of the output in ...
8
votes
2answers
1k views

Powershell Remotely Delete PKI Certificates

I recently rebuilt my PKI and I would like to delete the certificates that were issued to all client machines across my network. Sounds like a job for Powershell! So I wrote this script to be ...
23
votes
2answers
3k views

Is there a way to loop through Windows 8 Apps and remove them all?

Windows apps are annoying and I would like to remove them. Been playing around with Powershell and scripting and I wanted to know if there was a way I could make Powershell to loop through all the ...
6
votes
2answers
8k views

How to list out Virtual Directories in IIS from the all the websites in PowerShell

I have hit a complete roadblock and cannot figure out how to print out the virtual directories for each website in IIS 8. I keep retrieving Applications and empty null argument errors and just can't ...
1
vote
1answer
1k views

PowerShell out-gridview cmdlet asks for PowerShell ISE but it is already installed

I am trying to use the Out-GridView cmdlet on a Windows Server 2008 R2 box. It complains that it can't run because I need to install the Windows Powershell Integrated Scripting Environment feature. ...
3
votes
1answer
8k views

Copying files from local server to remote server using powershell

Apologies if this has already answered directly or indirectly in SF. My requirement will be as follows: Move a deployment folder that has got files and subdirectories to a remote sever. Pass ...
4
votes
1answer
6k views

Running PowerShell scripts as an Application in MDT 2013

Is there a way to make powershell scripts run under the applications list so that when you install from the MDT image you can select which scripts you want to run? I can run the scripts fine as ...
0
votes
1answer
712 views

Installing SQL remotely using Invoke-Command

i'm trying to install SQL Server 2012 on Win 2012 r2 server remotely via Powershell using Invoke-Command, but it fails with this error "Validation for setting 'SQLSVCACCOUNT' failed. Error message: ...
1
vote
2answers
944 views

Check management server on SCOM 2012

I have to check about 400 machines for the management server as we have moved from SCOM 2007 to 2012 and we need to check if the old SCOM 2007 server is still being pointed at. On an individual ...
0
votes
0answers
650 views

Accessing Exchange server 2013 from window 7 using Remote PowerShell?

I am trying Remote PowerShell from Windows 7 to Exchange Server 2013. Following is the code snippet. public static void ConnectToPowerShell() { string password = "password"; ...
2
votes
2answers
6k views

PowerShell Firewall Management

I have a bunch of machines that I need to enable Remote Scheduled Tasks Management (RPC), Remote Scheduled Tasks Management (RPC-EPMAP), and Windows Management Instrumentation (WMI-in) on for GPO ...