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)

1
vote
1answer
73 views

New-ADGroup with Multiple -OtherAttributes?

Keep getting "The Paramater is Incorrect" I think im following microsofts method correctly but its not working, any help is greatly appriciated. New-ADGroup -DisplayName $name ...
0
votes
1answer
173 views

Create Outlook rule via PowerShell

I'm looking to create a PowerShell script that creates an Outlook rule which delays any email sent out by one minute. I have very limited PowerShell knowledge and cannot find much information on ...
1
vote
1answer
111 views

Trigger an update with Azure PowerShell DSC Extension

I'm using the DSC Extension in Azure to configure the VM's and on first deployment that works fine. However, if I've made an error in the DSC script or need to amend it I am having trouble ...
0
votes
1answer
107 views

How do I filter Exchange 2013 new-moverequest by “StatusDetail”

I am trying to make a report of "interesting" moves, errored, lagged, or slow. I'm starting with this Get-MoveRequest -ResultSize unlimited | where {$_.status -ne "Completed" -and ( ( ...
1
vote
1answer
39 views

Powershell: PSScheduledJob for non-admin

Is there a way for non-admins to use the PSScheduledJob module? For example, I tried Register-ScheduledJob without admin privilege, but it returns "Access is Denied" error. We know that we can allow ...
2
votes
2answers
291 views

PowerShell to remotely invoke Exchange with other credentials

I've been tasked with creating a script that is going to be run on multiple user machines throughout the network. The commands that we're ultimately going to have run will change the user's email ...
3
votes
2answers
230 views

Can't Get PSExec to work with Powershell

Last week I developed a script that would check if psremoting was enabled on specified machines. This week I began working on a script that would enable psremoting on specified machines but I can't ...
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 ...
0
votes
0answers
61 views

Hostednetwork rejecting connections after a while

I am trying to use netsh hostednetwork to host a wireless network. The problem is that after a while (1 hour - 14 hours) noone is able to connect and already connected people get disconnected after a ...
8
votes
3answers
3k views

PowerShell - Install-WindowsFeature (and family) missing on Windows 10?

We have some Powershell scripts used to set up various dev/test/prod environments and one of them installs and configures IIS. Unfortunately these scripts don't appear to be working under Windows 10 ...
1
vote
2answers
201 views

How to extract specific emails from Exchange Online using PowerShell and move or sort them?

In Exchange Online (Office 365), I need to extract emails, from particular sending addresses, from a handful of user mailboxes, to another user mailbox folder. I've been reading about the ...
0
votes
2answers
103 views

Accept Value From Pipeline Powershell Function

I would like to create a script that tell the user whether or not PSRemoting is enabled on multiple remote machines. Here is what I have so far: function Test-PSRemoting { Param( ...
1
vote
1answer
52 views

Get-VMHost does not show the server Networkinfo and number of processes

I run the following powercli 5.5 command , to get info about a host vm :- Get-VMHost |Export-Csv -Path c:\VM.csv -NoTypeInformation –UseCulture and I got these info :- State ConnectionState ...
0
votes
1answer
87 views

Unable to connect to server using its name “Connect-VIServer ”

I wrote the following PowerCLI command to connect to a server by its name :- Connect-VIServer -Server "t***.v****ces.intra" -User root -Password "*****" but I got the following error:- ...
1
vote
2answers
89 views

Why is there no 'powershell' tab in the group policy scripts dialog?

I would like to run a powershell script at startup but there is no 'powershell' tab on the dialog box. I am running Windows Server 2008 64-bit. Thanks!
0
votes
1answer
79 views

Connect-VIServer will always propt a dialog to enter username & password

I rung the following command inside powercli 5.5:- PowerCLI C:\> Connect-VIServer -Server 172.16.20.101 -User root -Password **** but I got a dialog to enter username and password although I am ...
0
votes
0answers
116 views

Map USB External HD to Hyper V Server 2012

I wanted to attach a USB external HD to one of my VM. I got Hyper-V Server Core 2012 R2. So I was about to follow any guides on internet (like this one Accessing USB Drives in a Hyper-V VM ), but I ...
0
votes
1answer
66 views

Accounts suddenly expiring when created with 'NET USER /ADD /expires:NEVER'

I'm using the following command in a PowerShell script to create new local user accounts. The account is created successfully, the correct password is set and I can logon to it fine. NET USER ...
0
votes
0answers
283 views

How to export SQLCMD output to Excel

I am using SQLCMD command in powershell to run SQL scripts. When i pipe the output to TXT ,the formatting is all messed up. i want to export the results to excel file. how can i do that. My command ...
0
votes
1answer
69 views

Powershell script from DFS server not running

I have an application in a Citrix/2008R2 that is acting as a user starting point for other apps. I have recently had to modify this application to integrate it more deeply with active directory. As ...
2
votes
1answer
88 views

Trying to get a second parameter in my PowerShell function to work

I have a Function I am working on to pull DisplayName and UninstallStrings from a remote computer's registry. If I only use "$software" parameter, it works fine for my local PC. But, if I add the ...
0
votes
0answers
79 views

Issues with Get-WinEvent running in remoting session

Looks like below code does not work $EventLogonIDs="4611","4624","4625","4634","4647","4648","4672","4774","4775","4 908","4964" $MultipleIDLogEntries={Get-WinEvent -FilterHashtable ...
2
votes
1answer
219 views

Active Directory Module for PowerShell Get-ADObject and Set-ADObject don't work with custom attribute

I am trying to work with a custom attribute in an AD LDS instance that I did not create, using the Active Directory Module for PowerShell. Unfortunately, the cmdlets Get-ADObject and Set-ADObject are ...
2
votes
1answer
358 views

Adding Folder Permissions Using Powershell

I'm running this script in PowerShell: Add-NTFSAccess -Path 'C:\MyFolder' -Account PROGRAMMING\IIS_IUSRS -AccessRights FullControl and I'm getting this error: Add-NTFSAccess : Cannot bind ...
3
votes
1answer
260 views

PowerShell AD LDS query with filter using wildcard not behaving as expected

I am the administrator for a learning management system website that stores its page structure in AD LDS. I am trying to run a query to get objects (pages on the site) matching a filter for ...
1
vote
1answer
216 views

Deploy a Powershell script and run on shutdown thru group policy

I have a Powershell script I need to deploy to my clients PC and then run it on shutdown. I̶ ̶k̶n̶o̶w̶ ̶i̶t̶ ̶i̶s̶ ̶p̶o̶s̶s̶i̶b̶l̶e̶ ̶t̶o̶ ̶r̶u̶n̶ ̶P̶o̶w̶e̶r̶s̶h̶e̶l̶l̶ ̶s̶c̶r̶i̶p̶t̶s̶ ̶o̶n̶ ...
0
votes
0answers
26 views

Scheduled tasks not working depending on context

I'm trying to run a PowerShell command for a persistent session in Metasploit. It downloads and executes shellcode on system startup. I've gotten it to work when I'm on the computer with the GUI, ...
1
vote
1answer
118 views

Powershell: kill one window of a subset running under one process?

Using powershell can I kill/force close a single window (excel workbook) running under Excel without killing the whole process which closes all excel workbooks running under that same process ...
0
votes
1answer
93 views

PowerShell DSC Pull Server with digitally signed module - ErrorDetail is The PS <path to module> is either missing or its associated MOF schema

I've configured a test DSC pull server and I'm attempting to use a digitally signed xPowerShellExecutionPolicy file but I am constantly getting an error stating that the MOF schema file is invalid or ...
1
vote
1answer
69 views

Poweshell escaped wildcard

I'm trying to compare string which contains wildcard character. ("www.mysite.*" -match '`*') But something is not working because I always get a True response, for example ("www.mysite.com" ...
1
vote
1answer
124 views

How to cast as ArrayList, preset data in param block, and return as ArrayList?

As I need to be able to add and remove items from an array I need to cast it as an ArrayList as opposed to the more common options ([string[]], [Array], $Var=@()). I also need to preset it with data, ...
1
vote
1answer
407 views

Powershell script get .NET Framework versions from remote PCs

I have the following script. Get-Content comps.csv | Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | Get-ItemProperty -name Version,Release -EA 0 | Where { $_.PSChildName ...
0
votes
2answers
46 views

Find the latest string based on time and display those

I have a text file as shown below: testdatabase-21-07-15-12-00 testdatabase-21-07-15-18-00 testdatabase-21-07-15-23-00 testdatabase-22-07-15-12-00 testdatabase-22-07-15-18-00 ...
0
votes
2answers
350 views

Bulk Update AD Attribues with Employee ID as matched key

I have a CSV file that I need to bulk update AD with. The file has an employeeID, which would match the employeeID field in AD. So far, I've been able to update a user successfully with a CSV file if ...
0
votes
1answer
81 views

Mass forward usermailbox emails to mailcontacts with same name. Need powershell command to do so

I have 2 OU's of users that each have a mail contact with the same name in a seperate single OU. So Jane Doe would be in Staff\OU1 with jdoe@contoso.com email. Mike Doe would be in Staff\OU2 with ...
0
votes
1answer
212 views

Copy-item with multiple filter

How can I use copy with multiple filter values? For example, it works if I specify only 1 value to filter (*.jpg) Copy-Item -Path Y:\TEST -Recurse -Filter *.jpg -Destination ...
2
votes
1answer
135 views

How do I find IIS web application dependencies using powershell and webadministration on Server 2012

Wondering if someone can help with this. I have a number of servers that host IIS 7.5 and IIS 8.5 web application of various types. As these are production web applications and servers i can't ...
0
votes
0answers
99 views

NTFS Traverse-permission - How are the correct settings?

I am trying to get the traverse-permission to work, but I just can't handle it. I have read a lot of threads (at serverfault and some other places) but still... What I want to do is the following: ...
0
votes
3answers
78 views

Powershell Querying Code

I am having issues writing some PowerShell code. I am trying to run a query against Active Directory which will export all groups, members of the groups, email addresses, and SIDs of each user to a ...
0
votes
1answer
59 views

Access is Denied for PowerShell access site via URL in localhost

What IP I need o put in the IP Address and Domain Restriction in order to allow Windows PowerShell to be able to run Invoke-WebRequest to a URL for a site that is hosted on the same machine. I am ...
0
votes
1answer
58 views

Is there an Exchange Powershell command that allows events to be added to room resources in OWA?

We have an onsite Exchange server, we have a room resource that has been created and is opened as an other calendar in Outlook. When using Outlook 2007 we can add an event to the resource. When we log ...
1
vote
2answers
77 views

Check backpressure live on Exchange2010 server

I am working a lot with exchange servers at the moment and would like to make sure there is no backpressure built up on them. Right know I have a powershell script running every 4h to check the ...
0
votes
1answer
180 views

Windows Server 2012 R2 The route addition failed: The system cannot find the file specified

I am using a simple powershell command,(ran as Admin) as follows. route –p add 172.30.200.0 mask 255.255.255.0 0.0.0.0 IF 28 I have done this no problem on Windows 8.1, but when I do this in ...
9
votes
1answer
171 views

Can I change the update descriptions in WSUS?

On each Microsoft patch day, I have a pretty large amount of new updates I want to approve to my clients. But instead of 'Approve all updates and continue', I gather information on each update at its ...
3
votes
2answers
477 views

How do I get the equivalent of Set-DnsClientServerAddress in Windows Server 2008 R2?

How do I set the DNS address for a network adapter programmatically in Windows Server 2008? It looks like Set-DnsClientServerAddress isn't supported.
0
votes
0answers
23 views

Finding HP archiving Stub emails

In exchange 2007 managed content, is it possible to search all mailboxes for a mail item using the message class, i.e. IPM.Note.PERSISTMailItem is there a powershell script for this.
1
vote
1answer
63 views

Automate Windows administration tasks [closed]

I'm diving headfirst into PowerShell (by no means an expert yet) and am looking to build a GUI to automate Windows admin tasks, both for the deskop and server side. I know there are third-party tools ...
1
vote
1answer
39 views

Add a scheduled task to the GPO progrematically

The assumption is I'm on a DC with admin rights. I want to add an immediate task to the GPO to run a .exe on the workstations, but I want to do it without the GUI i.e. quietly. Is there a way to do ...
0
votes
2answers
72 views

Poll domain members for their screen resolutions

Is there a way via WMI or Powershell to ask each domain member what the resolution is on their desktop? I need to know but can't go and visit each one. For bonus points, how to summarize the results ...
6
votes
2answers
222 views

Stopping IIS websites permanently with PowerShell

Stopping websites using Stop-Website is, apparently, not the same as stopping them using the IIS Manager. Stop-Website 'Some site' iisreset.exe # site is started again Using IIS Manager, the state ...