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
2answers
30 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 ...
3
votes
2answers
25 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 ...
0
votes
0answers
9 views

Removing archiving stub

We are transitioning to a new version of exchange and need to remove the archive stubs, from outlook, which are short-cuts to archived mails which we will not need. There are 1200 mailboxes that need ...
1
vote
0answers
11 views

Copy Folder from Structure to new location

I have a structure of 900 users like below User 1 Personal personal.pst I need to copy the Personal folder from each user folder to a new structure such as below User 1 (diff username) ...
3
votes
2answers
14 views

List shadowcopy timestamps of netapp

Is there a way (powershell, commandline, api, snmp) to list the snapshot timestamps of a file on a network location. So i'm searching for an automation of what windows is doing, when you click ...
1
vote
0answers
21 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 ...
0
votes
0answers
14 views

Unable to install RD Connection Broker role service on server

I'm currently having a lot of difficulty trying to setup a new RDS 2012 R2 Session Deployment. New-SessionDeployment -ConnectionBroker servername -SessionHost servername -WebAccessServer ...
2
votes
1answer
23 views

Reversible Encryption - Not Defined but Showing as Enabled?

I'm reviewing our complex password policy that was setup by a previous admin and I'm trying to gain some clarification on the setting for Reversible Encryption. In our organization, reversible ...
-1
votes
0answers
22 views

How can I run this powershell script in parallel?

I have 100 databases in Exchange that I want to perform a task on. I might want to change the currently mounted server or something else. When I run this command, each database is serially synced. I ...
0
votes
1answer
33 views

Is it possible to add permissions to an Active Directory account using PowerShell?

We're deploying Active Directory, and we're using PowerShell scripts for most of it: creating the forest, creating AD elements (users, groups, sites, subnets), etc. We'd like to make some users able ...
1
vote
2answers
39 views

Change different domain account without being admin Windows

I have 2 accounts on a domain. I can log into a citrix virtual desktop with the one account fine, but the other won't let me log into anything until I first change my password. I am remote, so I ...
0
votes
0answers
24 views

powershell command to get a list of all the snapshot in vmm (hyper-v)

i am using below script to get snapshot which are associated with my particular VM, but i am getting only recent snapshot information , can someone correct me in below script - $vmcheck = Get-VM ...
0
votes
1answer
10 views

Want to get checkpoint details for particular VM through “VMM PowerShell Script” activity

i have orchestrator with service manager installed . now i want to give facility to my developers to get checkpoint information about respective VMs (particular) from SMportal so that they can revert ...
1
vote
1answer
29 views

Format-List in Powershell-Function not working

i want to use format-list inside a function in a powershell script to have some nice-formatted output. But when I use it, it simply doesn't print anything. In this thread the author had the same ...
2
votes
1answer
36 views

Bulk License Office 365 Users by OU with PowerShell

I'm trying to do something that I don't think should be too complicated of a fix. My end goal: I have certain users in one AD OU that need to use a certain license in Office 365, and different users ...
0
votes
3answers
46 views

Security concerns with enabling PowerShell on a production server [on hold]

I work in the software development side of an ISV. We're thinking of using PowerShell for some utilities in and around the core application (which itself is ASP.NET). One of my colleagues said to me ...
1
vote
0answers
33 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: ...
2
votes
1answer
31 views

How can I invoke a foreground process from a background PowerShell Job?

I'm working on a PowerShell script that provides console output and restarts the system several times during the script's operation. As soon as it starts, it registers itself as a Scheduled Job so ...
1
vote
1answer
28 views

Powershell remoting with active directory

I am able to connect to domain controller via below scrip remotely, but after that i want to run disable-ADAccount ,Get-ADUser command but I am getting error Get-ADUser : The server has rejected the ...
1
vote
1answer
34 views

Import IIS Advanced Logs into SQL

I'm using IIS 8.5 Advanced Logging and also logging some custom HTTP headers. How can I import the raw logs into SQL on a regular basis (i.e. every minute)? I want to avoid the overhead of ODBC ...
3
votes
2answers
51 views

Hyper-V guest loses network access when virtual switch port is in trunk mode

I have guest VM on a Windows Server 2012 R2 machine running Hyper-V. Currently, the guest is using the native vlan (vlan ID 1). I can communicate with the guest from the host and from the network. ...
0
votes
2answers
24 views

Powershell script failing when executed from Azure Site Recovery Plan

$username = "username" $password = convertto-securestring "*****" -asplaintext -force $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password ...
2
votes
1answer
26 views

How to properly deploy internal self-signed scripts (Powershell)

Completely new to certificate usage so be gentle. I'd like to deploy Powershell scripts that I made to other employee computers so they can use them, but I will need to sign them in order for them to ...
-1
votes
1answer
21 views

Apply group policy based on RDP Client O.S

I created a group policy to change the default shell, so that handheld PC can RDP to a Terminal Server and have the lob application kiosked. This work fine, but, sometime, is necessary to RDP with the ...
-1
votes
0answers
37 views

Attempting to list all shares on a networked server using PowerShell

So this is the issue which is concerning me. I'm attempting to connect to a networked server which is using SMB protocol, then once connected to create a list of every share on the server. I have been ...
7
votes
1answer
90 views

In what context do SCCM Powershell detection scripts run in?

I have finally had success using PowerShell detection scripts on clients with AllSigned execution policy. (hint: It started working after installing the latest service pack and using Adam Meltzer's ...
0
votes
0answers
24 views

Copy files to “default” location using UNC path

When I log in remotely using PowerShell, I'm placed in a default location: > Enter-PSSession SERVER [SERVER]: PS C:\Users\smithe\Documents> I'd like to copy a folder recursively to this ...
1
vote
0answers
37 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 ...
0
votes
3answers
94 views

Powershell script to change local admin password

I have a script that I am using to change the local admin password from Microsoft. https://support.microsoft.com/en-us/kb/2962486?wa=wsignin1.0 is where I found it. Here is the script for anyone too ...
0
votes
1answer
33 views

Exchange Powershell Export to pst size

I'm using exchange powershell to export exchange mailbox to pst. I'm using this command: New-MailboxExportRequest -Mailbox user -FilePath [path] This works but one user was 30GB and each ...
2
votes
1answer
34 views

-ErrorAction SilentlyContinue not working

I'm working with powershell I'm calling a script from c#. I'm trying to copy logs from different servers, foreach($server in $args) { $destination = "\\$server\$path" if(!(Test-Path ...
1
vote
0answers
20 views

Exchange Online Powershell Dynamic Dist. List of Contacts

We have Exchange online with Office 365. I am trying to set up a dynamic distribution list of external mail contacts if their address contains a certain email domain. I have tried the powershell ...
1
vote
1answer
27 views

Test impact of DSC script using vNext in Release Management

Following the examples on the web, it's not hard to set up a working example for the first DSC script. However, I need to find a way to just list the changes that the script will make, not actually ...
1
vote
1answer
29 views

What's the “supported” way of using Exchange PowerShell cmdlets in a script?

From what I've read, Microsoft doesn't support using the Exchange PowerShell cmdlets from anywhere but the Exchange Management Shell. However, surely people need the ability to script things and run ...
0
votes
0answers
19 views

How to refer to office365 user using Set-Mailbox in Powershell

I'm trying to change a user mailbox to a room mailbox in powershell. I know the basic command is: Set-Mailbox "John" -Type Room When I try to run this, I keep getting an error that says the object ...
1
vote
1answer
18 views

Test if PowerShell script being called with Invoke-Expression?

Is there a way to tell if a script is being called using Invoke-Expression rather than called directly? I want to do something different, e.g. pause for input, if the script is being called directly ...
0
votes
0answers
51 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
1answer
24 views

Powershell to non-domain machine

I'm writing a small script that needs at one point to connect to a machine that is not a domain member. The machine the script is run from will always be a domain member. I've found that using the ...
2
votes
1answer
57 views

Set-NetFirewallRule alternative in Windows Server 2008

I am trying to Enable Powershell Remoting on a Windows Server 2008, but from what I understand, the default firewall exception is that PSRemoting is only allowed if the computer (both client and ...
0
votes
2answers
63 views

powershell change filename using first 10 characters and mask

This script was working fine for a while but I have found that users don't always comply with the correct naming conventions for it to be effective. I have been banging my head trying to modify it but ...
7
votes
3answers
470 views

Cannot set Powershell ExecutionPolicy for CurrentUser

Here is a sample of the commands I am running: PS C:\> Get-ExecutionPolicy -List Scope ExecutionPolicy ----- --------------- MachinePolicy Undefined UserPolicy ...
2
votes
1answer
62 views

How to combine two foreach loops?

I've looked at how to combine multiple commands with psexec but none of the methods seems to work. Maybe it's because I'm running the script in PowerShell and not cmd.exe? I need to create user ...
9
votes
1answer
140 views

Windows Remote Management Over Untrusted Domains

I am currently trying to enable Windows Remote Management (specifically, Powershell Remoting) between 2 untrusted domains, and having no luck. A brief description of my setup: domain1 - my ...
0
votes
1answer
38 views

What permission is needed to use a service account to remote run powershell on a server?

I have a internal webapplication With a list of all the servers in our network. I want to be able to run a few PowerShell commands on the servers to gather usefull information. Invoke-WMIMethod and ...
1
vote
1answer
81 views

Scheduled task deployed via GP, that runs a powershell script on a network share by a AD service account

I've created a powershell script that runs Chocolatey updates as well as does some logging locally and on a network share. The script itself resides on a network share, and I'm hoping to be able to ...
1
vote
1answer
64 views

Retrieve SCCM collection membership via PowerShell

I'd like to find a PowerShell script that retrieve the SCCM collections for a given computer or user. I know this can be achieve via a SCCM query, but I'd like to do this using a PowerShell function. ...
1
vote
2answers
111 views

Retrieve internet proxy server address via PowerShell

I have to retrieve the proxy server address and port via PowerShell, so I can use the Invoke-Webrequest -uri http://some-site.com -Proxy command. The expected output should looks like ...
0
votes
0answers
61 views

Invoke-RestMethod cmdlet not found in Orchestrator 2012 R2 Run .Net Script Activity

I'm trying to use Invoke-RestMethod in a PowerShell script within an Orchestrator 2012 R2 runbook. When I run the runbook, it tells me: The term 'Invoke-RestMethod' is not recognized as the name ...
2
votes
1answer
120 views

Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell

I have a server which we are using for Batch processing. I can login to the server with svc_account and run powershell -f file.ps1 and it runs fine in either version 2 or 3 by the following - ...
0
votes
0answers
31 views

ERROR: OpenSSL::PKey::RSAError: data is too large for key size", when trying to upload cookbook 'learn_chef_iis'

I am receiving the following error message: "ERROR: OpenSSL::PKey::RSAError: data is too large for key size", when trying to upload cookbook 'learn_chef_iis'. I was following a CHEF tutorial and now I ...