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)

7
votes
0answers
1k views

Import Powershell AD Module during MDT Task Sequence

I have written this short powershell script to rename a computer as part of an MDT task sequence: Import-Module ActiveDirectory $AdminUsername = 'domain.com\administrator' $AdminPassword = ...
4
votes
0answers
115 views

Using get-wsuscomputer with -ComputerUpdateStatus

I have WSUS installed on a Server 2012R2 box. I am trying to use the Get-WsusComputer powershell command to get a list of computers with pending or failed updates. The documentation for the command ...
4
votes
0answers
221 views

Get-Process not working against remote Windows 7 clients

I have been trying to run Microsoft's GetNetworkStatistics script against remote computers to enable us to track what processes are using bandwidth along with other tools. I am unable to run the ...
4
votes
0answers
110 views

Besides looking dumping $PSVersionTable and dumping the variable and env “PS-Drives”, what else can I do to compare PowerShell environments?

Besides looking dumping $PSVersionTable and dumping the variable and env "PS-Drives", what can I do to compare PowerShell environments? Here's the problem: I have very similar machines running ...
3
votes
0answers
30 views

Windows Server firewall track connection state

I am trying to control a Windows Server 2012 (R2) firewall by using PowerShell commands (see https://technet.microsoft.com/en-us/library/hh831755.aspx#BKMK_ProfileGlobalDefaults for example and ...
3
votes
0answers
54 views

Trying to use powershell to selectively erase old backup files

I am working with a drive with thousands of backup files, many of which are just cluttering space. The program our employees use creates a backup of a spreadsheet every time they open one for ...
3
votes
0answers
81 views

Powershell DSC File copy - Workgroup machines

I've got a machine that I need to copy files to from a network share (on domain) for a deployment from a machine that's off domain. Currently I have the following code; Configuration deployWebsite ...
3
votes
0answers
392 views

Adding multiple users from a group to an Active Directory group using Powershell

I have a powershell script that is supposed to go through a specific ou and store the groups into a variable $groups. Here is the code I use in the script: $Groups = Get-ADGroup -Properties * ...
3
votes
0answers
347 views

How to persist credentials in a remote Powershell session?

I have an Azure File Share and would like to use this from my Azure VMs - after persisting the credentials on the VMs with cmdkey and mounting with net use. This was tested by running these commands ...
3
votes
0answers
10k views

List ALL Printers using Powershell

I'm having issues listing all the printers on a computer using Powershell. We have a batch script that will add/remove/list "per computer" printers using PrintUI. I can use PrintUI to list the ...
2
votes
0answers
28 views

Retention for Attachments - - - Microsoft Exchange 2010

Currently I am working with getting rid of voicemail to email files to save space in our archiving solution. Currently I have a search-mailbox script written to take care of deleting the voicemail ...
2
votes
0answers
295 views

Get AD Group Member - Different Domains

I've been tasked with exporting the members of a few AD groups to .csv which I've always done in the past using the Get-ADGroupMember command in powershell, specifying the group name, selecting the ...
2
votes
0answers
178 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 ...
2
votes
0answers
50 views

Deploying Server 2012 with DNS role using WDS and answer file

I want to deploy an image using WDS on Server 2012. I will be using an answer file for unattended installation with little touch as possible. My answer file works great but I can't get the auto-logon ...
2
votes
0answers
909 views

How to retrieve a MDT task sequence variable and use it properly inside Powershell

I'm trying to retrieve a MDT task sequence variable inside a Powershell script, then use that variable in a Powershell function. My problem lies in that the variable I want to retrieve contains a ...
2
votes
0answers
258 views

Can not install Office 2010 via winrm

I am trying to install Microsoft Office 2010, I have created a MSP and config.xml file so I can do this from Powershell, using the following command: Start-Process "C:\temp\Office2010\x86\setup.exe" ...
2
votes
0answers
86 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
123 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
295 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 ...
2
votes
0answers
196 views

how do i combine multiple powershell scripts in a guided install (for example with wix) but without the trail (ARP etc.)

I am working on a project where we need to repeat certain steps with powershell to deploy stuff. i would like to create a process/install guidance (steps supported with UI) with WIX but after the msi ...
2
votes
0answers
202 views

Query performance counters from powershell

I am trying this script to query performance counters in different localized windows server versions. http://www.powershellmagazine.com/2013/07/19/querying-performance-counters-from-powershell/ ...
2
votes
0answers
4k views

Exchange (2013) Powershell Connection Error

I am using Windows 2008 R2 with Exchange 2013 I am trying to connect to my exchange server with the following command but receive an error each time: $session = New-PSSession -ConfigurationName ...
2
votes
0answers
1k views

Powershell and sharepoint and updatelistitems() exception

I've got an issue where I keep getting "Exception calling "UpdateListItems" with "2" argument(s): "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." whenever I ...
1
vote
0answers
15 views

Associate a Public IP in an Azure Resource Group to a Web App?

I'm playing around with Azure Resource Groups. I've created a group, and in it, I've created a web app. (This is all just academic and I'll delete it all when I'm done leaning, so I don't mind ...
1
vote
0answers
33 views

Remotely change local group policy server 2008R2

I'm trying to find a way I can edit the 'trusted hosts' list under local group policy remotely. Path from within Local Group Policy is: \local computer policy\computer configuration\administrative ...
1
vote
0answers
43 views

How to do I create linux VM with ssh public on azure automation

Right now, I am creating Linux VM without public key on azure automation. My aim is to create linux VM with ssh public key on azure automation. How to get ssh public key from "accets" on azure ...
1
vote
0answers
61 views

PowerShell: Populating TreeView with Directory Hierarchy

So I'm attempting to write a PowerShell script with a GUI input; idea being that the end users see a nested TreeView of the file system. They tick a some folders, hit a button, ...magic happens. I ...
1
vote
0answers
28 views

Powershell Script to Automate Mailbox to PST

I have one script which is working though but I am not a advanced programmer. Please somebody modify my script as I wanted to ? 1) Mailboxes should be exported from specific server "ServerX". Right ...
1
vote
0answers
42 views

Windows Management Framework 4.0 via GPO

I'm planning to set up a PowerShell-Masterserver. In order to do that I want to make sure that every Computer and Server running Windows 7 or Windows Server 2008 R2 has PowerShell 4.0 installed. To ...
1
vote
0answers
26 views

Remote Desktop Farm Deployment ports

I'm in an environment where the firewall is very strict (as in every port is closed unless requested to be opened). When deploying my 2008 R2 Remote Desktop Farm through PowerShell I'm getting to ...
1
vote
0answers
24 views

Hyper-V 2012 R2 x64 UpdateID

I'm trying to write a powershell script in order to manage my updates for multiple Hyper-V 2012 R2 machines. To problem i stumbled upon is that i am unable to find the updateId for it so i can manage ...
1
vote
0answers
33 views

PowerShell - Simple local security CmdLets

As of 2015, are there any simple CmdLets, either in an MS module or a community project, for managing roles and permissions and ACLs, as easy to use as the old DOS commands, e.g. net localgroup? I ...
1
vote
0answers
30 views

Configure cloud-config using Azure Powershell 1.0

I have spent some significant time getting an Azure PS script starting up a few CoreOS instances. I have everything working except I have no clue how to get the cloud-config added. Using the CLI, ...
1
vote
0answers
58 views

Running apps on remote machine using current user credentials

I'm using enter-pssession to connect to a remote machine via Powershell. I then try to run an application via this connection on the remote machine. However, when I do this, it believes the user is ...
1
vote
0answers
45 views

Issues with Powershell Remoting

I'm configuring a new network and i need to enable Powershell Remoting. I'm in an Active Directory Domain and all my Clients are connected to the Domain. I'm able to run remote commands (Get-Process ...
1
vote
0answers
215 views

enter-pssession : Connecting to remote server failed with the following error message : The user name or password is incorrect

I am unable to connect to domain controller via below script. This script is working for another domain controller so it mean script is correct. While I am connecting i am getting an error: ...
1
vote
0answers
161 views

Windows 2012 Post-sysprep Powershell script not running

I have 2 templates 1 x Windows 2008 R2 1 x Windows 2012 R2 I have sysprep'ed both templates, Generalize / shutdown, etc, etc On both templates have I the following post-sysprep script that should ...
1
vote
0answers
246 views

How do I troubleshoot “Failed to get staged packages for package” error when attempting to remove a provisioned app from an offline Windows 8.1 image?

When I attempt to remove provisioned apps from an offline Windows 8.1 image, most of the apps I want to remove cause no problem, but attempting to remove Microsoft.Office.OneNote causes an error. The ...
1
vote
0answers
61 views

Create websites from a csv file and folder permissions

I have a csv file that contains 10 different website configurations. I've created the script below to automate their creation. When I test the script, it runs succesfully, but I'm wondering if this ...
1
vote
0answers
108 views

Windows Forwarded Events date filter not working

I have a Windows Server 2008 R2 configured to receive forwarded events from a large amount of clients (Windows 7\8.1). It receives events in the event ID range of 8000-8006 from the WLAN-Autoconfig ...
1
vote
0answers
1k views

Identifying mailboxes with corruption Exchange 2013

We're preparing to rid ourselves of Exchange on-premise and are migrating from an outsourced hosting provider to go to Office 365. We're running a fully patched version of Exchange 2013, atop Server ...
1
vote
0answers
169 views

Error in getting powershell remote session through ssh-enabled PowerShell

I am trying to login to windows 2008 server "C" from my machine "A". There is machine in between "B" serving as jumpbox running windows server 2008 and running "SSH-Enabled PowerShell Access for ...
1
vote
0answers
113 views

Getting Group Policy identifier in PowerShell

Some of our computers have a random "local group policy" being set that forces them to check a nonexistent intranet server for Windows Updates instead of using WU over the internet as they should. ...
1
vote
0answers
189 views

Allow Powershell script executed on Exchange server to send mail - best practice?

I've got a single multi-role Exchange 2010 server and a need to execute a Powershell script on monthly schedule. And i really would like to send a report via email to some local company's mailbox by ...
1
vote
0answers
114 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 ...
1
vote
0answers
286 views

“Please Wait” When running startup script, only on Windows 8.1

I have a startup script and I have been testing it on 3 different virtual machines. These machines are running different versions of Windows(7, 8, and 8.1). They all have the same Group Policy applied ...
1
vote
0answers
588 views

Powershell execute Queries using SQLPLUS

I have a RHEL server with Oracle 10G installed. I need to write a powershell script to query my database and get the output. I have imported Posh-SSH module and am able to connect to my RHEL server ...
1
vote
0answers
522 views

azure powershell run customscriptextension - powershell exit code 1 - works from Azure Portal

I’ve been working on automation for Azure VM deployment with the Microsoft CustomScriptExtension for VMs. http ...
1
vote
0answers
229 views

Stop automatic reboot with gpedit shutdown script in Windows 2k8

I am search for a way to validate and maybe stop an automatic reboot under windows. E.g. automatic reboot is initialized by windows update. When adding a shutdown script with gpedit this script gets ...
1
vote
0answers
2k views

Move-ADObject : The operation could not be performed because the object's parent is either uninstantiated or deleted

PS C:\Users\Administrator> Get-ADComputer NAME | Move-ADObject -TargetPath "OU=SERVERS,OU=COUNTY, OU=STATE,OU=REGION,OU=COUNTRY,DC=subdomain,DC=mydomain,DC=com" However, I am getting this: ...