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
7 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 ...
0
votes
0answers
3 views

WMF 5.0 (April Preview) DSC Pull Server Installation fails

I am trying to install The DSC-Service Windows Feature on a Windows 2012 R2 machine with WMF 5.0 already installed. The installation fails with the following errors: Install-WindowsFeature ...
1
vote
1answer
16 views

Win Terminal Server/RDS - dynamic printer mapping after session reconnect

I am trying to figure out this Problem: When a user disconnects his/her RDS (on Windows Server 2012 R2) session in Office 1 and reconnects in Office 2, then still all the Printers relevant to Office 1 ...
1
vote
2answers
36 views

PowerShell - How to format the output of two distinct commands in one table?

Foreach($a In Get-GPO -All) { Foreach($b In $a | Get-GPPermissions -TargetName "Domain Admins" -TargetType Group) { $a.DisplayName; $b.Trustee.Name; $b.Permission } } I use the command to output all ...
1
vote
2answers
31 views

Polling FTPS/SFTP Server with Windows Server 2012

Is it possible to securely routinely poll an external FTPS (or SFTP) server and copy/move the files locally using standard Windows Server 2012 functionality? I imagine the use of scheduler to do the ...
0
votes
1answer
20 views

AD Powershell Module to retrieve from AWS Directory Service

I know using AD module for powershell we can retrieve domain computers details and export it as csv. But I have my domain in AWS directory service and I have a computer under this domain. I tried ...
0
votes
1answer
58 views

How to find out all users and their details using a single line command on windows server 2012 active directory? [on hold]

I would like to know if there is a single line command in dsquery or LDIFDE or any other command to fetch the details of all the users in all the domains in my Active directory.
8
votes
3answers
128 views

PowerShell: Get-ADUser Properties with åäö

I'm trying to extract select sets of users with Get-ADUser. The users belong to companies whose names include non-ASCII characters, e.g. "Gåäördet". Unfortunately, we do have to use the company ...
1
vote
1answer
39 views

How to execute a powershell script from a remote application as a specific user

I have an application which can execute a powershell script on remote windows machine. I am trying to map a network drive using a powershell script. When the same script executed at the endpoint, ...
2
votes
1answer
93 views

powershell pipeline object to function

Here's the stub of what I'm trying to do: function Set-test { [CmdletBinding()] param( [Parameter(Mandatory=$True, ValueFromPipeline=$True)] [object[]]$inputObject ...
0
votes
1answer
29 views

PowerShell Write-Host not synchronous

I'm writing a PowerShell script to check some properties of a server. When I execute the following cmdlets in order, the output is not displayed in the order I expect. Write-Host "=== Operating ...
0
votes
1answer
11 views

Unable to perform enable-bitlocker and lock-bitlocker successively

I am trying to enable bitlocker on windows server 2012 R2 data volume using following command: Enable-BitLocker -MountPoint $volume -Password ($password | ConvertTo-SecureString -AsPlainText -Force) ...
1
vote
2answers
30 views

Exchange 2010 PowerShell: Value.ToMB() Method Fails Remotely but Works Locally

I am building a report of certain mailbox attributes from Exchange Server 2010 using PowerShell. The following code worked perfectly from my management workstation using a remote session. $Mailboxes ...
2
votes
1answer
47 views

Install Active Directory PowerShell module on Windows Server 2012

I need to install the AD PowerShell module on Windows Server 2012 but I can't afford for the server to restart during business hours. My question is can the AD module be installed from Add/Remove ...
3
votes
0answers
35 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 ...
2
votes
1answer
38 views

remote Powershell script Scheduled task

I am having trouble running a Powershell script as a scheduled task. The script remotely logs into two Hyper-V hosts, queries the replication status and emails the result back to me. The script works ...
4
votes
1answer
59 views

With powershell get exactly the same application list as in Add/Remove programms

There are various methods to find installed applications on the system but to my knowledge none returns exactly the same list as control panel item Add Remove Programs. Some of the ways I tried are: ...
1
vote
1answer
24 views

Moving one website from one server to another using powershell

I've been reading about MS Deploy and writing a small script to export/import one website from one server to another server(IIS8 to IIS8). But I ran into sizing problems and some other errors and the ...
1
vote
1answer
32 views

Task Scheduled Powershell Script Not Shutting Down machine

I have a task running on a Hyper-V server setup as such: schtasks /CREATE /TN AutoShutdown /RU "SYSTEM" /TR "Powershell \"C:\AutoShutdown.ps1\"" /SC ONSTART It runs properly (as far as I can tell) ...
0
votes
1answer
29 views

Windows Network Interface Monitoring - Nagios/Powershell

Function netstat { Get-WmiObject Win32_PerfFormattedData_Tcpip_NetworkInterface | where{$_.Name -eq "vmxnet3 Ethernet Adapter"} | % { 'OK | Rx-B/s= {0:0}; Tx-B/s={1:0}' -f ($_.BytesReceivedPersec), ...
1
vote
0answers
18 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
21 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 ...
2
votes
0answers
28 views

Best approach to deploy DLL file updates to Win7 clients

We are in a Windows 7 / Server 2008 R2 domain environment. We have a .NET application with lots of internal libraries for different UI and other features. We deploy it from a share where a directory ...
0
votes
1answer
40 views

powershell : System.Object[] instead of the actual path

The script below does not produce the path to the files in question, in my CSV file. Instead it is giving me System.Object[]. Please advise as to what I am doing wrong here. My goal is to clean up ...
2
votes
1answer
49 views

Install RSAT-Hyper-V-tools fails on Windows Server 2012 R2 Server Core

When I try to install Rsat-Hyper-v-tools with powershell command: add-windowsfeature rsat-hyper-v-tools -includeAllSubFeature It fails with error saying that: The source files could not be ...
3
votes
1answer
44 views

Scheduled PS Script Not Running

I'm trying to run the script from https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27 I've corrected the variables for my environment and I'm able to run it from my workstation and ...
0
votes
0answers
21 views

powershell exchange 2013 get-mailbox command

The get-mailbox command does not work on powershell exchange 2013. Does anyone know a replacement command? I need to copy mail from a certain time period from one user to another. Thanks
0
votes
1answer
17 views

Write-S3Object : A parameter cannot be found that matches parameter name 'Credentials'

I’m trying to set up AWS deployment via the AWS Tools for Powershell on a new machine using write-s3object -credentials $aws_creds ..., and I’m running into the following error: Write-S3Object : A ...
5
votes
2answers
81 views

It seems like updates described in the KB3057134 make PowerShell to start slow

Starting this morning it takes 3-4 seconds to start even very simple PowerShell script on my machine. This command shows 3.2-3.4 seconds on my machine and only 0.4 second on co-worker's machine. ...
0
votes
1answer
101 views

“Maximum number of items that can be serialized or deserialized in an object graph” when executing GetMsolUser -All

I have an office 365 tenant on which I execute the following command Get-MsolUser -All on server A I get get-msoluser : The formatter threw an exception while trying to deserialize the message: ...
0
votes
1answer
50 views

Powershell script issue

I am having an error with the script below: $server_names = Get-Content "C:\ArchivedFolders.txt" Foreach ($server in $server_names){ Copy-Item "\\$server\C$\Mail\*" -Destination ...
2
votes
1answer
33 views

How can I input password to manage-bde -pw option via windows powershell

I am trying to encrypt Data volume (for example E:) with the following command: manage-bde -protectors -add E: -pw When I execute the above command, it will ask for the password, so I entered it. ...
7
votes
1answer
179 views

How to edit Active-Directory Site properties via Powershell?

I am having trouble accessing the location property of my Active-Directory's Site via Powershell. (Windows Server 2012 R2) The following command returns no value: > (Get-ADReplicationSite ...
0
votes
1answer
53 views

How to remove string and replace with content found in text file using batch script or powershell

How to remove string and replace with content found in text file using batch script. test.txt Version: 4.5.0 Import: //MPackages/Project/config/abc.txt #head ...
1
vote
1answer
60 views

Powershell: A parameter cannot be found that matches

I am new to the Powershell world. Below is my first script $sServer = "Fully.Qualified.Computer.Name" $os = Get-WmiObject -class Win32_OperatingSystem -computername $sServer $object = New-Object ...
2
votes
1answer
89 views

Use Powershell to start a GUI program on a remote machine

There are two Windows 7 machines setup on the same network. I enabled everything needed so that they could communicate with winrm. When I run the following command: Invoke-Command -ComputerName ...
1
vote
1answer
46 views

Powershell service creation with ad credentials logon error

Powershell service creation with ad credentials issue I use the powershell below to create a service running with AD credentials. However when I run it I get an error messgage (also below). If I ...
-1
votes
1answer
25 views

Office365 User Activity Tracking

I have a situation where a user's mailbox on exchange online enterprise sign-in was disabled as employee was on a suspension, however the mailbox was re-enabled upon employee returning to the office. ...
2
votes
1answer
43 views

Powershell v1 Search String from Variable

I am trying to search a variable which holds a list of files, gotten from get-childitem, and list all matches to a specific search string but can't seem to get the result I want, what am I doing ...
0
votes
0answers
26 views

Microsoft TMG - Firewall Client software on Win 7 hosts to bypass credential prompt

They're running Microsoft TMG at my current customer's site. I am a developer and use lots of online/cloud tools and make frequent HTTP requests to the internet. I'm continually managing proxy ...
2
votes
1answer
82 views

Map Network Drive to a WebDAV Server via PowerShell

My goal is to map a network drive in Windows to a WebDAV server via PowerShell. I have a script that automatically creates an Azure VM with IIS installed and WebDAV configured. I can successfully map ...
1
vote
1answer
44 views

Windows remove DNS server

I have a DNS server that is misbehaving. Some of my windows machines only have 2 dns servers server01 192.0.2.1 server02 192.0.2.2 Some of my windows machines have 3 dns servers server01 ...
0
votes
0answers
21 views

How do I enable Get-MailboxFolder to work against other mailboxes?

Get-MailboxFolder by default seems to only work on one mailbox, that of the logged in user. I'm trying to leverage the Identity parameter of the cmdlet to connect to other mailboxes. I discovered ...
-2
votes
1answer
57 views

How to remove Powershell from Windows Server 2012? [closed]

I want to remove Powershell from Windows Server 2012. I have removed it in Windows XP by removing its updates. Also, when I removed Powershell from "Remove Role and Feature" I lost my GUI! Would you ...
0
votes
0answers
25 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 ...
6
votes
0answers
79 views

Powershell's equivalent to Bash's process substitution

Bash has <(..) for process substitution. What is Powershell's equivalent? I know there is $(...), but it returns a string, while <(..) returns a file the outer command can read from, which is ...
1
vote
0answers
24 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
votes
0answers
36 views

Variable values to pass from local computer to remote in Pssession [migrated]

I have a powershell script. Executing this will create a session with remote computer and execute some scriptblock inside remote computer. After that execution I need to send a mail. So, I get the ...
1
vote
1answer
44 views

powershell sccm import-module error

Have downloaded the sccm powershell module from https://www.microsoft.com/en-us/download/details.aspx?id=46681 Installed via the .msi no issues. On import, like so: > Import-Module ...
0
votes
0answers
35 views

How to add a data disk to a vm in resource manager using the resource group template file?

I would like to provision a server with azure resource manager that has a data drive. What json do I add to my azure resource group template file in order to provision the server with a persistent ...