PowerShell is Microsoft's new scripting language in 2006, and significantly upgraded in 2009. It allows interpreted scripts based on PowerShell cmdlets and .NET primitives.

learn more… | top users | synonyms (1)

3
votes
1answer
33 views

How to get robocopy summary information involved in powershell?

I have a quick script written to compare file differences across servers, and then give a prompt for whether to mirror the changes. I'd like it to intelligently NOT prompt for copying if there aren't ...
3
votes
2answers
64 views

Email results of PowerShell Script

I have a powershell script that check the certificate store for expiring certificates. It will display these results within the CLI. I want to modify this script to email the results of the output in ...
7
votes
2answers
48 views

Powershell Remotely Delete PKI Certificates

I recently rebuilt my PKI and I would like to delete the certificates that were issued to all client machines across my network. Sounds like a job for Powershell! So I wrote this script to be ...
19
votes
2answers
808 views

Is there a way to loop thru Windows 8 Apps and remove them all

Windows apps are annoying and I would like to remove them. Been playing around with Powershell and scripting and I wanted to know if there was a way I could use powershell to loop all the apps and ...
3
votes
2answers
45 views

How to list out Virtual Directories in IIS from the all the websites in PowerShell

I have hit a complete roadblock and cannot figure out how to print out the virtual directories for each website in IIS 8. I keep retrieving Applications and empty null argument errors and just can't ...
1
vote
1answer
13 views

PowerShell out-gridview cmdlet asks for PowerShell ISE but it is already installed

I am trying to use the Out-GridView cmdlet on a Windows Server 2008 R2 box. It complains that it can't run because I need to install the Windows Powershell Integrated Scripting Environment feature. ...
1
vote
1answer
33 views

Copying files from local server to remote server using powershell

Apologies if this has already answered directly or indirectly in SF. My requirement will be as follows: Move a deployment folder that has got files and subdirectories to a remote sever. Pass ...
3
votes
0answers
39 views

Running PowerShell scripts as an Application in MDT 2013

Is there a way to make powershell scripts run under the applications list so that when you install from the MDT image you can select which scripts you want to run? I can run the scripts fine as ...
0
votes
0answers
11 views

Automating Application Dependencies and Return Codes

I'm developing an end-to-end Application creation automation into SCCM 2012 from Orchestrator 2012. I've fully completed it using the MS PowerShell cmdlets as well as WMI manipulation, and PowerShell ...
-1
votes
0answers
20 views

Windows server SAN/storage path availabilty check [closed]

I need to check the SAN/storage path availability for windows server. Can I have this done through powershell. If yes, how? Many thanks in advance. Regards, Chittaranjan
0
votes
1answer
35 views

Installing SQL remotely using Invoke-Command

i'm trying to install SQL Server 2012 on Win 2012 r2 server remotely via Powershell using Invoke-Command, but it fails with this error "Validation for setting 'SQLSVCACCOUNT' failed. Error message: ...
1
vote
2answers
20 views

Check management server on SCOM 2012

I have to check about 400 machines for the management server as we have moved from SCOM 2007 to 2012 and we need to check if the old SCOM 2007 server is still being pointed at. On an individual ...
0
votes
0answers
59 views

Accessing Exchange server 2013 from window 7 using Remote PowerShell?

I am trying Remote PowerShell from Windows 7 to Exchange Server 2013. Following is the code snippet. public static void ConnectToPowerShell() { string password = "password"; ...
0
votes
1answer
34 views

PowerShell Firewall Management

I have a bunch of machines that I need to enable Remote Scheduled Tasks Management (RPC), Remote Scheduled Tasks Management (RPC-EPMAP), and Windows Management Instrumentation (WMI-in) on for GPO ...
1
vote
0answers
31 views

IIS 8: Setting the application pool username is ignored

I do this on IIS 7.5: Create an application pool, "testpool", and set the username and password to match one that exists in the AD. Then in powershell as administrator: Import-Module ...
2
votes
1answer
21 views

How to Resolve Hyper-V Disk Location to Drive Letter

When viewing cluster disk properties in Failover Manager or the physical path to VHD's in the settings of a VM in Hyper-V Manager the location is displayed by GUID. Is there a quick way find out ...
-2
votes
1answer
31 views

how can i find information about all exchange server in the organization?

Power Shell command Get-mailbox gives details of all the mailboxes on the server by which i am running this command. For example, i have two exchange server in my organization named server1 and ...
-1
votes
1answer
20 views

Query AD Users from date [closed]

How can I query users in AD that have been added since an specific date and that their user logon name starts with UTX ? Im guessing I need to do it with powershell but I have very little knowledge. ...
3
votes
1answer
36 views

Powershell DISM New-Windows Image: Using a CompressionType gives an error

PS C:\ProgramData\Microsoft\Windows\Hyper-V\BigHomie> New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType "Max" Throws ...
6
votes
1answer
120 views
+50

ESXcli command timeout at 30 minutes

I am working on a powercli script to loop through each datastore in our environment and reclaim space on the thin provisioned LUNs. All LUNs in the environment are Dell Equal Logic. vCenter ...
0
votes
2answers
52 views

Powershell script:Loop/Array not retriving all AD Get Commands information: error “cannot bid parameter identity”

I have a powershell script that loops and retrieves AD information using get commands. At the moment its retrieving the selected information for account name and distinguised name. But if I add ...
0
votes
1answer
32 views

PowerShell won't rename an export .csv file

I am trying to rename the file export.csv to the $name but with a .csv extension instead of .file. The output is still $name.file. Import-Module ActiveDirectory $name = Read-Host "Enter Group Name" ...
0
votes
0answers
29 views

Make Azure Powershell cmdlet's available to team city

I have installed the Azure powershell cmdlet's via the web platform installer on my build server that is running TeamCity. However, when I setup a powershell build step I get an error: ...
0
votes
2answers
58 views

Copy-item FileSystem provider error

Copy-item cmdlet is not working as expected, i don't understand why. This is my code : $Source = "C:\folder1" $Destination = "\\172.22.0.115\c$\folder2\" $Password = ConvertTo-SecureString ...
-2
votes
2answers
60 views

Powershell script for retrieving AD information using piped Get commands then copy to csv file but getting “append” error

I am trying to run multiple Get Commands to retrieve AD information. I piped all of these commands and now I want to write the output to write all the the information ito one csv but at the moment i ...
1
vote
1answer
44 views

More efficient way to retrieve Office365 data via Powershell

I am trying to get mailbox statistics from Office 365. This is the current script: # Get credentials $O365Creds = New-Object -Typename System.Management.Automation.PSCredential -ArgumentList ...
-3
votes
0answers
46 views

How can I create an AD user via PowerShell prompting for options? [migrated]

I'm trying to create a PowerShell script which will create users based on template users I've created. The initial steps I'm trying to figure out are below: Upon execution of the script show a ...
10
votes
1answer
211 views

How do I convert a vhd to a wim file?

I just setup and sysprepped a nice new VM, now I need to convert it to a wim real quick, to upload to my sccm server. For some reason, I can't change the VM properties to boot from a legacy nic for ...
0
votes
2answers
40 views

PowerShell - Add multiple strings to the same element in an array

So I have a array that I need to search through line by line and divide up by interfaces. My code loops through this file line by line. I want to split up the interfaces by the "!" character and add ...
0
votes
1answer
35 views

Pstools or Powershell or Both

I'm having a problem at the moment deploying and managing windows services and I'm looking for advice on the best course of action. Here's what I have working (below) - the problem is it's a bit ...
0
votes
1answer
68 views

Grant user write access to DNS Server (Win2k8)

I want to remotely manipulate DNS records via Powershell scripts and I use the following script: $zone='company.local' $dnsrecord='dummyDNSrecord.company.local' $rec=Get-WmiObject -ComputerName ...
3
votes
1answer
56 views

Configure and monitor Windows 2012 DHCP server with Powershell

We've recently been working with the documentation here to set up some access policies for a new DHCP server. I've been able to successfully import 600+ records with the Set-DhcpServerv4Policy -Name ...
3
votes
2answers
66 views

Ensure drive is mapped at login on laptop with strictly wireless

So, $software runs on a 'server' (windows client w/ file sharing to share out the db folder), and laptop client has the drive mapped and $software also installed. This is the vendor's recommended ...
1
vote
1answer
30 views

What happens to active connections to my SQL Server DB if I back up the transaction log with the NORECOVERY option?

Some background: I'm migrating my SQL Server DBs to a new machine and I wrote a few Powershell scripts to send/apply full backups and transaction logs asynchronously to the new server, but my question ...
0
votes
0answers
39 views

Powershell deploment script into multiple 2003 windows servers

I have created a script "test.ps1" that runs security checks on folders within machines. Now I want to deploy this script into 70 windows servers so it can run these security checks on all of them. ...
5
votes
2answers
147 views

How to print out information about Task Scheduler in powershell script?

I am trying to print out information from the Task Scheduler from the local computer in a PowerShell script so other users can print out this information as well and not have to access the Task ...
2
votes
1answer
39 views

How do I set “CustomAttribute6” for a regular AD user?

I'm trying to set AD attribute 6 in Powershell to update a user who has no mailbox, and isn't an exchange contact; and is only an AD user ObjectClass : user The command I'm using is: get-adobject ...
2
votes
2answers
85 views

It cannot determine the content type of the HTTP response from the destination computer wsman

I am trying to connect to an Exchange server via a wsman connection using PowerShell. The client server in question is in a Workgroup, while the Exchange server is in its own domain. I use the ...
0
votes
1answer
81 views

Powershell Script not working

I have this scripts that should move Computers based no their subnet, but I keep on getting the following error and I can't for the life of me find the problem. I can manually move computers using ...
2
votes
2answers
88 views

PowerShell Import DnsShell Module

So here's the list of available modules in this directory. As you can see DnsShell is there. PS C:\windows\system32> Get-Module -ListAvailable Directory: ...
2
votes
2answers
123 views

How can I set an arbitrary (non default) attribute for an AD user or AD Contact?

I have AD Users, or contacts that are not Exchange Mailbox users, or contacts. I also have a SSO system (Ping Identity... technology similar to Microsoft ADFS), where it leverages the AD Schema ...
1
vote
3answers
174 views

How can I disable a scheduled task using Powershell?

I have a web application that runs on Windows Server 2008 R2, which has a large number of scheduled tasks which take care of all the backend stuff. When I do a software deployment which touches the ...
0
votes
2answers
51 views

non-GUI connection to local Hyper-V VM without network

I have a virtual machine on Hyper-V manager (Windows 2008 R2) without a network configured on the VM. From a powershell script running on the host Windows server, I would like to query into the OS of ...
1
vote
2answers
82 views

PowerShell - finding users who are Inactive AND not disabled

I wrote this cmdlet: Search-ADAccount -filter {(enabled -eq $true)} -Users Only -SearchBase "ou=FirstOU,dc=domain,dc=com" -AccountInactive -TimeSpan 30 But it outputs an error: Search-ADAccount : ...
3
votes
1answer
208 views

PowerShell - Finding all of users' group memberships and kicking it out of them

as title says, I have to find all the groups that the user is a member of, and deleting its membership from all of them. I've tried this: get-adgroup -filter * | where {(Get-ADGroupMember $_ | ...
1
vote
2answers
172 views

PowerShell - Limit the search to only one OU

Ive got this cmdlet and I'd like to limit the results to only one OU: Get-ADUser -Filter {(Enabled -eq $false)} | ? { ($_.distinguishedname -notlike '*Disabled Users*') } Now Ive tried to use ...
3
votes
3answers
241 views

PowerShell script that should find disabled users that are not in a specific OU outputs users from that OU as well

Hey I've got this cmdlet here: Get-ADUser -filter {(distinguishedName -notlike "Disabled Users") -and (enabled -eq $false)} -searchBase "ou=FirstOU,dc=domain,dc=com" I've built it to find disabled ...
1
vote
1answer
47 views

Trying to list out Web services, Web sites, and App Pools - Windows Server 2003

I am curious on how i would list out Web services, Web sites, and App Pools to a .txt file on a Windows Server 2003 machine. I have Powershell 2.0 configured and have been trying to run some scripts ...
1
vote
1answer
75 views

Turn Windows Features on or off, Windows 8, Windows Batch File

I am looking to produce a batch script that turns on a number of Windows Features as the same routine is currently performed on multiple machines, an example of this would be... Turn on Default ...
0
votes
1answer
23 views

Powershell waiting for more parameters when asking for all users from a specific OU?

I want to get all the users from OU "myusers" so I have this cmdlet right here: get-aduser -filter * -searchbase"ou=myusers,dc=domain,dc=com" But when Im running it, powershell prints a >> ...