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
0answers
29 views

DNS server help not found in powershell?

I have run Update-Help on my Server Core 2012R2 machine, but when I run get-help on any cmdlets from the DNS server, it says it cannot find the help files on the computer and suggests running ...
0
votes
1answer
74 views

Windows PowerShell - How to view commands history date/time [closed]

I want to list entered commands in Windows PowerShell with their respective timestamps. How can I do it with Get-History command? Also if that isn't doable then please show me a way to check which ...
0
votes
1answer
92 views

Testing 3 conditions in Powershell IF statement is driving me batty

I'm trying to drive one of six outcomes from the combination of three variables being a '0' or '1' and I can't get the right output when testing three conditions no matter how I try. I've tried 3 ...
1
vote
0answers
31 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
1answer
120 views

Bulk import to AD powershell

I'm trying to import en employee list into AD using powershell. The script needs to update exisisting AD objects. The problem I have is that some users will have mobile number some internal numbers ...
1
vote
0answers
26 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
2answers
47 views

How to connect to sql server to take backup of a database from powershell

I am new to powershell. I got requirement to take the backup of MS sql database backup from the other machine and not within the server. Can you please let me know what possible utilities required to ...
2
votes
2answers
142 views

Powershell Scripts works for 10 months, suddenly stops working

When I create my new users every week, I execute this powershell scripts I put together. It has been working like a charm for 10 months, but as of last week started throwing this strange error: ...
0
votes
2answers
204 views

Windows Server notify when installing updates finished

The Windows Servers in our environment (2008 R2 and 2012 R2) install updates automatically once a month, but don't restart automatically (yet), because the WSUS server should be the last server to ...
2
votes
1answer
386 views

Get-AzureRmResourceGroup not returning resources from current subscription

If I run Get-AzureSubscription -Current I get: SubscriptionId : a*<guid> SubscriptionName : Development Environment : AzureCloud ...
4
votes
1answer
187 views

No results when trying to populate array in a function

I am trying to use a function to populate an array with computer names to pass on to another part of a script. I am pinging all computer names in an OU and when it comes back as online, I would like ...
5
votes
3answers
3k views

Allow Standard User to Run Program as Local Admin Without Elevation Prompt

I work in an environment where local admin privileges for users isn't allowed. At all. This is very nice, but can be also be a pain when employees who must have local admin permissions to run a ...
3
votes
1answer
193 views

How do I stop service on remote server, that's not connected to a domain, using a non admin user via PowerShell

I've got the start of the script to achieve this: $SecurePassword = ConvertTo-SecureString –String $Password –AsPlainText -Force $Credential = New-Object -TypeName ...
3
votes
2answers
395 views

Exporting All Groups and Group Members from Active Directory

I am relatively new to powershell and am trying to get a list of all groups in the domain with their respective members. Here's what I'm working with now: Import-Module ActiveDirectory $OutPutFile = ...
2
votes
2answers
323 views

Access Denied Importing Certificate on Remote Machine

I'm trying to come up with a way to push out a certificate for install on multiple machines. The method I came up with is: Invoke-Command ServerName {Import-Certificate -FilePath "path" ` ...
-3
votes
1answer
107 views

Acess remotely to registry with Powershell [closed]

I would like to access remotely to the registry of a Windows machine to see some keys under "SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" with a Powershell script I ...
1
vote
0answers
36 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
41 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, ...
3
votes
2answers
525 views

Run PowerShell script with Service Start

I'd like to set the Affinity and Priority of a service process when it is started (without modifying the service/process code, I don't own the code, it's a 3rd party service). I know I can do: ...
4
votes
1answer
138 views

Does Windows Firewall need to be on to enable PowerShell remoting on Windows 2008/2012 servers?

Does Windows Firewall need to be on to enable PowerShell remoting on Windows 2008/2012 servers? That is, if the Windows Firewall on a 2008/2008 R2/2012 R2 server is turned off can PowerShell remoting ...
0
votes
4answers
5k views

Export simple list of all computers in multiple OU's in AD [closed]

I have a program that selects which computers to connect to based on a text document. The list needs to only have the Computer names, 1 on each line. Nothing else. I'm needing a command or script ...
4
votes
0answers
227 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 ...
2
votes
1answer
211 views

Powershell Remoting security implications by adding users to WinRMRemoteWMIUsers

In our current workflow, we have to RDP to several servers just to know if a service is up-and-running. We do not have admin rights to those servers but are allowed to view, start and stop services. ...
2
votes
1answer
117 views

Power-Shell get-service commandlet - how to expand possible values for service status

If I run get-service it may return different statuses (0-4/Running, Stopped, Stopping, Running). Can I somehow expand a list of possible values for status by issuing PowerShell commandlet? I tried ...
2
votes
1answer
184 views

How to safely swap/replace a PhysicalDisk in a Parity Storage Pool

I have Storage Space configured with Parity resiliency that has a total of 5 SATA drives. 4 of the drives are near full capacity (90% used). I am now getting a low capacity warning because this. I ...
3
votes
2answers
144 views

Configuration of RelayIPList using CimObject breaks Windows SMTP server

I am trying to configure Windows Server 2012 SMTP server using PowerShell. I plumbed for using the IISSmtpServerSettings CimObject. I get the object, apply my change (allow localhost to relay sender ...
3
votes
1answer
2k views

How can I get a static download link for a Microsoft MSDN Subscriber Download?

I need to be able to download MSDN ISO files directly from power shell, and therefore I am wondering how can I do this? I can view the downloads site at ...
4
votes
1answer
185 views

Export Firewall Rules using PowerShell that include Program Path

I'm looking for a way to export existing Windows Firewall rules using PowerShell that includes the path of the Program being referenced (for those rules which reference a program path instead of a ...
1
vote
1answer
57 views

How to change a VM's checkpoint type from Production to Standard using powershell

I need to change the checkpoint type from "Production" to "Standard" using powershell. My current script for creating the new vm is pasted here, but that creates a VM with "Production" checkpoints. ...
4
votes
1answer
124 views

Do you Suspend-ClusterNode before or after Move-ClusterGroup?

Which do you do first to avoid service interruption? Or does it not matter? Is it: Suspend-ClusterNode -Drain Get-ClusterNode $env:COMPUTERNAME | Get-ClusterGroup | Move-ClusterGroup or: ...
0
votes
1answer
176 views

New-PSSession with Exchange On premises failing “Access is denied”

I have a script that runs from a web server via a web page that connects to an exchange server (exchange 2013 on windows 2012 R2). The web server is running Windows 2012 R2. The script runs under the ...
-2
votes
2answers
283 views

Powershell script to restart automatic Windows services and notify if failed

I found a Powershell script that checks all automatic services on Windows servers and if they are not started, tries to start them. Here is the link ...
-2
votes
1answer
36 views

Modify multiple accounts script

I need a script to make modifications on multiple accounts. Within the account, in general info, the display name should include “name +surname” + Custom Title. So the script should just add the ...
0
votes
0answers
48 views

IIS - Rewrite with PowerShell

I want to add a URL redirect rule to a specific Web.Config/Site. I know how I can do it with the GUI. I know how I can do it with the Web.Config. (The URL Rewrite Module is installed) But how can I ...
0
votes
1answer
58 views

Powershell archiving script

I found the below powershell script on "Hey, Scripting Guy! Blog" it is a great arching script. I modified it to meet my needs of a log file being created and sending an email. However i discovered ...
3
votes
0answers
139 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 ...
1
vote
1answer
94 views

Is there a supported Windows CIM/WMI provider for Dell PERC Generation 11 or later?

I have Dell OpenManage Server Administrator (version 7.4) for Windows installed on a 12th generation server with a PERC H710P. That machine has a root\cimv2\dell namespace which does not seem to ...
1
vote
4answers
181 views

How can I tell which of my nested AD groups a user is member of?

I have a set of nested AD groups: group subgroup1 subsubgroup1a subsubgroup2b subgroup2 subsubgroup2a userXY subsubgroup2b I'm using "group" to grant access ...
2
votes
1answer
44 views

Accessing DelegateListLink Property in Exchange Online?

I need to give a couple of users ReadPermissions to some mailboxes. And I need the read-only mailboxes to appear in the users' Outlook via auto-mapping. I know that you can achieve this via the ...
1
vote
2answers
2k views

Powershell - Find all users with password never expires

I am looking to query AD via Powershell in order to see all user accounts within my forest who have their password set to never expire. I found a few scripts online using a quick google search but ...
0
votes
1answer
20 views

Reconfiguring large Hyper-V network for speed with failover

I currently have 10 IBM x3650 M4 Servers. Each consisting of a minimum: - Dual Xeon - 192GB - 384GB - 2TB SSD RAID 10 (8 x 500GB Drives) - 4NIC All hardware is redundant, PSU, CPU, RAM etc. Each PSU ...
0
votes
1answer
61 views

Azure internal DNS search suffixes

I mainly use Azure for IaaS purposes (Linux and Windows VM's). We have a strict Front-End (FE) / Back-end (BE) segregation policy. FE and BE are in the same Virtual Network, but in different ...
1
vote
2answers
172 views

How do I exclude an imported list of directories from a Get-ChildItem list?

Our online backup software is skipping files and directories when uploading. It seems random, but I'd like to see if I can compare a list of files in the selection to the list of files in the cloud to ...
0
votes
0answers
152 views

Can't get MS Office mass delpoyment working. Update Not Running?

I am trying to mass deploy Office 2016 at work and I am testing it on one machine. I am using the following scripts and instructions. ...
1
vote
1answer
125 views

Using powershell to clean up text file

Been struggling with this and wondering if someone can help. I have a large text file that have extra data in it I want to strip out. Here is a sample of the input file: Text In Page - 1 S Dept ...
1
vote
2answers
344 views

How to get “Physical Path Credentials Logon Type” for site and application?

I have an IIS 8 website setup with an application within. Using Powershell how can I get the "Physical Path Credentials Logon Type" setting (defaults to ClearText) for both the main site and the ...
0
votes
0answers
126 views

AWS Cloudwatch custom metrics using powershell throws error

I am configuring custom cloud watch metrics for windows ec2 instance. The command which I use to invoke the script manually is C:\Cloudwatch\Memory.ps1 -aws_credential_file ...
2
votes
4answers
718 views

Email notification when automatic service is not started (Windows Server 2012 R2)

We have a few servers (Windows Server 2012 R2) in our environment that install updates automatically and restart after that. After the restart we would like to check the status of all the (Windows) ...
1
vote
1answer
37 views

rabbitmqctl set_policy drops caret (^) anchor from regex pattern

I am running this from PowerShell, so I'm not sure if this would happen in a different environment (the regex itself just includes everything except for those starting with 'amq.'). When I run the ...
-1
votes
1answer
141 views

Script/Batch If Directory is a certain age then run .exe

I currently have a batch file that looks to see if a folder exists and then if it does it runs the uninstall exe within it and then installs the program with an msi. I need to alter it or just convert ...