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)

4
votes
3answers
430 views

Update-Help on a Server-core behind a proxy

I'm struggling to update the help on a server-core box behind a proxy. I have seen that it was possible to set winhttp proxy with netsh to solve the problem, but powershell update-help clearly don't ...
1
vote
3answers
5k views

Using Powershell's Invoke-command to install .exe on remote computer

I have an .exe I would like to install on a large farm of Windows Server 2008 computers. I am attempting to use Powershell remoting. I have this command which works locally: invoke-command {& ...
0
votes
3answers
644 views

Enable-PSRemoting on Windows Server 2008 R2 error

When giving the command Enable-PSSRemoting with or without the -Force parameter this error occurs Set-WSManQuickConfig : More data is available. At line:50 char:33 + Set-WSManQuickConfig ...
0
votes
3answers
349 views

How can I export the results of my script to file?

I need to get some details out of hundreds of XML files that were written for reporting. The script below provides the correct results, but I want them in file, cvs, xls, or txt so I can provide a ...
0
votes
3answers
293 views

Want to create two VM with same VHD running at the same time

can I create several machines each having an exact copy of an existing vhd and running at the same time . I have a an OS installation ready and I just want to copy the vhd so that other machines will ...
8
votes
2answers
783 views

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 ...
5
votes
2answers
1k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
5
votes
2answers
2k views

Why do weekly tasks created via PowerShell using a different user fail with error 0x41306

We have some scripts that create scheduled jobs using PowerShell as part of our application. When testing them recently, I noticed that some of them always failed immediately, and no output is ever ...
4
votes
2answers
562 views

Why am I getting unauthorized errors with Powershell get-winevent?

I'm a domain admin equivalent, I've tried running in an elevated console (right-click> run as administrator), and I'm consistently getting errors when executing get-winevent -logname application | ...
3
votes
2answers
251 views

Is it possible to get CCM Updates Schedule using Powershel or VBScript?

I want to be able to check the CCM Updates Schedule as seen in Configuration Manager Updates tab. I've been looking around on google and I've not been able to find a consistent answer to this. I ...
2
votes
2answers
245 views

Look up where a NTFS group is used

We are doing some AD clean up and migrating or deleting old AD groups and replacing them with our current naming stranded in AD. The challenge that we are running into is making sure we have the we ...
2
votes
2answers
130 views

Powershell: Consistent modules accross all servers/workstations

Whats the best way to get consistent modules across our servers and workstations. To put it another way: I want to be able to write a powershell script and have it run on all machines meaning each ...
1
vote
2answers
44 views

Duplicate current powershell session in a new window

Is it possible to duplicate a powershell session in a new window? I often find that I've created environment variables, activated a specific python virtualenvironment, defined one-off functions, ...
1
vote
2answers
151 views

Getting list of users indirectly members of an AD group through LDAP

I'm having a bit of a problem with LDAP search that should specify whether a user is a member of a given AD group or not (recursively). Basically, what I'm doing is issue a LDAP search with the ...
1
vote
2answers
102 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 ...
1
vote
2answers
854 views

Power shell script to fetch disk space on all servers in timely intervals

I got a Powershell script from here which will export Disk Space usage to html file. I want the scritp to give usage in timely intervals say each 15 mins or 30 mins. is there any way we can mod this ...
1
vote
2answers
854 views

Start-BitsTransfer Works when triggered manually from powershell but not using a windows service

I'm using BITS to transfer file from one windows 2008 R2 server to the other. When I run the command manually from powershell or regular command line it works perfectly. Now when I use the same ...
1
vote
2answers
4k views

How can I reset settings for Internet Explorer using a script?

I'm looking to reset Internet Explorer back to factory defaults using a batch file. I'd also like to delete: all Downloads, History, Cookies and Cache, plus anything else in a user's IE profile.
1
vote
2answers
540 views

PowerShell filter files by date in name

I have many files with different names per day. How can I filter them by the date in their name? For example: app_20130505.log app_20130506.log app_20130507.log app_20130508.log app_20130509.log ...
1
vote
2answers
678 views

New-MoveRequest - How to assign -TargetDatabase dynamically

I am in progress to migrate (approximately) 5000 mail-objects and I need a way /script /command that will allow me to utilize the New-MoveRequest CMD-Let in combination with the possibility to ...
1
vote
2answers
647 views

Powershell - winrrm using ip address instead of computer name

Is it possible to set up winrm using IP and address instead of the computer name. The computer in question is only I have only been able to set winrm up for a computer in the same domain like this: ...
1
vote
2answers
270 views

Listing services on remote machine locks me out of the machine

I run a powershell command to list all of the services on a remote matchine: $b = 0; get-wmiobject win32_service -computer $computerName -credential $cred | select-object Name, ...
0
votes
2answers
430 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
2answers
469 views

KQL Query to specify date range for Mailbox search?

I'm trying to verify some phone numbers using our exchange server with the following query to send the results to my inbox: Get-Mailbox | Search-Mailbox -SearchQuery “Body: '*XXX-XXX-XXXX*' OR ...
0
votes
2answers
495 views

Powershell script can't open a file when run as a scheduled task

Cross-posting from Stack Overflow because there are probably many more Powershell experts on Server Fault. My Powershell (2.0) script has the following code snippet: $fileName = "c:\reports\1.xlsx" ...
0
votes
2answers
454 views

Invoke command with IP address as Target server does not works at all

Please see the following command and with Trusted Hosts enabled, this does not work: Invoke-Command -ComputerName <IP address> -port 5985 -Credential (New-Object ...
0
votes
2answers
615 views

Set group permission on folder

I have a folder with lots of subfolders D:\Data\Subfolder1 D:\Data\Subfolder2 D:\Data\Subfolder3 D:\Data\Subfolder4 D:\Data\Subfolder5 ... I need to create three active directory groups ...
0
votes
2answers
493 views

Ban IP address based on X number of unsuccessful sql server login attempts?

Is it possible to expand on the idea presented in Ban IP address based on X number of unsuccessful login attempts? to encompass IP addresses for repeated failed sql server login attempts? There are ...
0
votes
2answers
78 views

Copying files from one machine to another

I'm currently generating documentation on one machine, and publishing it to a web server using the following commands in a script: net use "\\someShare" PASSWORD /user:username del /S /Q ...
0
votes
2answers
190 views

Invalid Cast on login type in Powershell

I am updating some powershell code to install Database Tables/stored procedures on a 64 bit machine. I keep getting an error when I try to assign the login type. Here is my current code. $login = ...
0
votes
2answers
601 views

How do I add an IP address to a users dial in tab within powershell

How do I add an IP address to a users dial in tab within powershell. I want to do it about a 100 times so I was hoping to use the ad cmdlets to perform the task reading from a csv file the account ...
0
votes
1answer
293 views

get-wmiobject failing across subnets?

We have two sites linked by a VPN handled by two dedicated Netgear VPN routers. Each side has a Win2003 domain controller. Each site can ping all the machines at the other. The domain controller ...
0
votes
1answer
301 views

Get-ChildItem fails to connect in SQLSERVER drive

I'm having some trouble with the SQLSERVER PSDRIVE. See error below. I only have named instances on my PC, both 2005 and 2008 Added the SQL snapins. The PC is named YODA The SQL instance is SQL2008 ...
0
votes
1answer
280 views

Getting error when trying to retrieve a security Descriptor from a Win32_Service class

I'm trying to retrieve the security descriptor of a Win32 Service. For that, I'm doing, in PowerShell, $sd = (Get-WmiObject -class Win32_Service | ?{$_.Name -like ...
0
votes
1answer
229 views

I would like to send the wifi wep key automaticaly to laptops on the lan via powershell

How do I send the wifi wep key automaticaly to laptops on the lan via powershell
-1
votes
1answer
173 views

portqry to check connectivity

Is it possible to check the connectivity between 2 remote servers using portqry given that the portqry.exe command is executed on another server. for example, check the connectivity between serverA ...
-1
votes
1answer
67 views

Automate Monitor string in different log files

I have few log files in different servers and I want to check output in the end of those log files for e.g . success: 4000 failed: 200 These logs files are getting generated daily and I have to keep ...