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

convert Dyamic DNS record to Static DNS record using CSV

I have a problem here that I have a list (.csv) of resource record in DNS (currently they're in dynamic) and i would like to convert them to static record. Do you have a powershell script for this ...
1
vote
1answer
7 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
1answer
49 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 ...
-1
votes
0answers
11 views

Monitoring changes to a directory and getting an e-mail for the changed/newly created files using a powershell script

I am new to Powershell scripting and trying to use a Powershell script to monitor changes in a directory and be informed of any new file creations or changes daily. Param ( [string]$Path = ...
0
votes
0answers
16 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 ...
0
votes
1answer
25 views

PowerShell script to click a javascript hyperlink

Powershell script to open webpage and click a specific link I am trying to write a script that opens up a specific webpage and clicks a specific link. I cannot edit the HTML as it is embedded on a ...
2
votes
0answers
55 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
11 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 ...
1
vote
1answer
20 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
18 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
44 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
35 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 ...
2
votes
2answers
27 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
59 views

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

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
141 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
41 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
97 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
33 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
50 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
36 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
41 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
61 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
26 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
33 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
33 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
22 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
41 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
53 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
48 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
22 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
20 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
83 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
111 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
55 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
40 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
192 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
56 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
67 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
93 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
47 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
29 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
95 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
45 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 ...