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
2 views

Azure Resource Manager storage - can I delete a VHD file using PowerShell?

I've recently been learning Azure Resource Manager template based deployment, and as a result I am deploying and removing a lot of VMs as I refine my ResourceManager templates. I have made a ...
1
vote
1answer
21 views

Powershell find orphaned processes

I am looking for a way to find processes that do not have a parent process running (orphaned processes). Im attempting to do this using win32_process. I have the query that returns the attributes ...
0
votes
0answers
11 views

MSSQL configuration by PowerShell - What am I missing?

I want to configure certain MSSQL server settings using PowerShell scripts. (OS is Windows Server 2012 R2, MSSQL is 2014. PowerShell was invoked as sqlps.) For instance, I want to enable/disable a ...
-1
votes
0answers
14 views

What are some techniques for reorganizing a file structure in a business? [duplicate]

At work I have gotten tired of how disorganized our shared drive is. I've determined the best way to reorganize everything would be to mimic the directory structure based on our organization chart. ...
0
votes
1answer
26 views

How to update machineConfig64 .Net Framework-configuration provider

I'm trying to synchronize an IIS Site from an old Windows Server 2008 R2 with IIS7.5 to a new Windows Server 2012 R2 with IIS8.5. I'm doing that with the WDeploySnapin3.0 PowerShell Snapin now I got ...
-1
votes
1answer
25 views

PowerShell: Getting a “does not support user interaction” error when no input is required

I'm running a PowerShell script during a TFS 2015-based deployment. It won't run because PS thinks it needs user interaction, but, when I copy-and-paste the command and arguments into the PS console ...
0
votes
1answer
17 views

How do I wait on a start/stop of a virtual machine in powershell

I have this powershell script that I'm calling to backup our customer's virtual machines: # Author: Vladimir Eremin # Created Date: 3/24/2015 # http://forums.veeam.com/member31097.html # ###########...
2
votes
1answer
28 views

Trouble using powershell output as a variable in batch file

I can manually run this command from a Windows Command Prompt: powershell (new-timespan -start 01/01/2000 -end (get-date)).days % 14 And it returns a number from 0 to 13. I want to use this result ...
1
vote
1answer
29 views

Is there a way to check if my Virtual Memory Paging is “System Managed”

For one of our applications, we need to configure virtual memory on a Windows Machine to be system Managed. This can be done manually under System Properties -> Performance (Settings...) -> ...
1
vote
1answer
30 views

How can I change owner of a Registry Key to which I don't have access?

I ran into a bizarre issue when I upgraded some machines to Windows 10 where incorrect permissions on RuntimeBroker caused problems. I found a solution online that recommended changing permissions (...
-3
votes
0answers
23 views

Can someone help me to have a powershell script to remove the “CRLF” text from the last line in a text file [duplicate]

Can someone help me to have a powershell script to remove the string "CRLF" text from the last line in a text file. I've asked my question incorrectly earlier
-2
votes
1answer
46 views

Powershell script to remove a text from end of line in a text file [closed]

I'm new to Powershell. Can anyone help me to remove a text "CRLF" string from the end of a line in a text file.
1
vote
1answer
30 views

PowerShell DSC +IIS Shared Configuration

I'm trying to set up TFS Release management to deploy to an IIS server that is set up for shared configuration. However, when the deploy is actually run, I get the following error: ##[debug]System....
0
votes
1answer
29 views

How can I find the IIS server instance that a website is hosted on in my domain by only its public URL?

I have started a new job and inherited a lot of servers and websites. One particular website I am unsure of what server/IIS instance it is hosted on. All I know is the public URL of the site. Is ...
-2
votes
0answers
20 views

Have a windows 7 Task scheduled batch run as a regular-user johndoe which starts an exe on johndoe login, how to prevent his killing of process?

I am starting a script from Windows Task scheduler as a regular-user johndoe and my script starts an exe that runs in background when johndoe user logs in and I want to prevent user from "killing" the ...
0
votes
1answer
29 views

PowerShell script to create VM in 2012 R2 fails when adjusting memory size

I've created a basic script to quickly add a VM in Hyper-V and everything works great until it reaches the Set-VMMemory command. At this point the variables seem to fail and generate an error. Script ...
0
votes
2answers
41 views

Error while emailing CPU and Memory Utilization from a Windows Server

i can generate CPU and Memory Utilization of my laptop and email them to my email address. When i try to do the same thing for a Windows Server 2008, i get "new-object cannot load com type outlook....
-2
votes
2answers
35 views

powershell script to find files not modified in the last 60 days Windows 2012 R2 [closed]

I'm trying to find files not modified in the last 60 days on a Windows 2012 R2 server. The built-in search ability in Windows doesn't offer this ability and I have installed the Windows Search ...
4
votes
1answer
44 views

Copy a Windows Server Firewall address list from one rule to another using Powershell

I'm a little stuck on the documentation for the Firewall cmdlets in Windows server. I am trying to copy the address lists for the remote and local ips from one rule to another. I can get the list ...
3
votes
2answers
37 views

Mimic delegation of control wizard with PowerShell

I want to delegate control of the TestUsers organizational unit to a user NickA and give the following permissions to it: Create, delete, and manage user accounts Reset user passwords and force ...
1
vote
1answer
28 views

Download a file with powershell on Nano Server?

I've had some significant difficulties figuring out how exactly to download a file with PowerShell under Nano Server. The challenge is the following: There is no Invoke-WebRequest There is no ...
3
votes
1answer
27 views

How to use AuthenticationInfo in xWebApplication DSC resource

I have the following in my DSC configuration: xWebApplication StaffDirectoryApp { Website = "MySite" Name = "MyApp" WebAppPool = "MyPool" ...
0
votes
0answers
16 views

WMI query returns “Generic Failure” exception for certain classes

I am trying to query Win32_USBHub or Win32_DiskDrive on a remote server using PowerShell, but I am receiving the following error: [PS]> Get-WmiObject -Class "Win32_USBHub" -ComputerName MyServer -...
0
votes
0answers
24 views

SCCM - Find when an application deployed to a specific computer

Is it possible to find when SCCM ran a deployment against a specific client PC, from the server? (CAS, primary or even secondary will do so long as I can script through to the data starting with only ...
0
votes
1answer
10 views

pscp works for one account but does not work for another

I have two accounts A, B both registered on the windows server 2008 R2. There is a script in which I use pscp module of putty to transfer files from the server. Problem being that the command runs ...
5
votes
1answer
69 views

get AD group path in the domain/tree

How to get the path of a specific group from the Domain/tree? I am not getting to the info with the "Active Directory Users and Groups" program. We have a extensive tree of folders beneath the ...
0
votes
0answers
19 views

powershell: Remove-DhcpServerv4Lease does not remove existing leases

I want to delete all DHCP leases and reservation from server WSKELLER. From the documentation I seem to understand that this would be accomplished with: Get-DhcpServerv4Scope -ComputerName WSKELLER | ...
1
vote
1answer
18 views

Is it possible to xcopy deploy PowerShell Gallery modules?

I'd like to install some items from the PowerShell Gallery. However, the servers do not have access to the internet, not even our test servers. It is possible to allow them to have access, but the ...
0
votes
1answer
26 views

Powershell Enviroment Variables not found

I'm trying to create a Shortcut for a powershell script that uses [Environment]::UserName the shortcut will be started from the correct user I want to read from env variable. %SystemRoot%\syswow64\...
0
votes
2answers
39 views

Powrshell Script to read the Windows Secutiry logs and filter Elevation type 196 and 1937

I have a powershell script that reads the elevation type and displays the content in powershell window. However I need to put the contents in Excel file. Please help. cls $evtLogEntries=$null $...
0
votes
0answers
26 views

powershell: delete all DHCP reservations/DNS entries in a scope/forward/reverse lookup zone

I have made a little powershell script that takes a fixed-width text file and populates a DHCP scope, a DNS forward lookup zone, and a DNS reverse lookup zone. My next step shall be to have the script ...
2
votes
0answers
19 views

Create VM on Azure with an existing VHD

I'm trying to create a virtual machine on MS Azure plaftorm, from my existing VHD file. When i'm trying to, I get the following error. Is there any parameter to specify the NIC? Did some research on ...
0
votes
0answers
12 views

Azure: Change OS Drive in Linux VM (non-classic)

My co-worker accidently turned on a firewall on an ubuntu machine in microsoft azure , which caused a complete cut of to the management via SSH - port 22 is now blocked. What i've done is: ...
0
votes
1answer
36 views

Comparing two items if matches powershell

I am exporting drive name movies in text file. Get-WmiObject win32_logicaldisk| foreach-object {$volumename -Match "movies" } | select movies > c:\nn.txt And later comparing it but not ...
0
votes
1answer
33 views

Get Error, Success Logs On powershell script Importing Bulk AD user

This Script will the best Bulk AD user creation script for me, if I am able to Generate success and error logs. This script just requires FirstName and Lastname on Csv that cut offs few minutes. ...
-1
votes
0answers
20 views

InetMgr.exe throw System.Management.Automation.CmdletInvocationException

I fired up my Windows 7 machine today and attempting to start Intemgr.exe the process terminates immediately. So I started the process under the debugger. It seems the process is terminating with the ...
0
votes
1answer
25 views

ContentFilter is invalid. System.Datetime

If i run the following $3MonthsBack = Get-Date (Get-Date).AddMonths(-3) -f MM/dd/yyyy New-MailboxExportRequest -mailbox kundesenter@company.no -IncludeFolders akriv -ContentFilter{Received -lt "$...
0
votes
2answers
58 views

Powershell - how can i list both username and group membership for users of a named group?

I am relatively new to powershell and I have two statements on the cmd line: get-adgroupmember <group name> | select-object name,samaccountname To produce a nicely formatted table with two ...
0
votes
3answers
42 views

Automated/scripted conversion of Normal.dotm from Word 2010 format to 2013

I want to migrate many users from Office 2010 to Office 2013. As we are working in RDP sessions, the migration per user consists simply in changing the server name in their local .rdp file. However, ...
0
votes
3answers
112 views

Obtain a list of servers from AD on which a specific software is installed?

Is it possible to obtain a list of servers from within Active Directory on which a specific software is installed? For example, get all servers that have wampserver version 5 installed on them.
0
votes
2answers
60 views

Powershell change AD variable “PasswordLastSet”

Is it possible to edit the PasswordLastSet value via powershell (or any method?)? If that is not possible, is there anyway i can set so a users password (not account) expires in X amount of days. I ...
0
votes
2answers
107 views

Find Computer in AD from non-joined Windows 7

I have a powershell script we use for several things, when a new computer has been installed with Windows 7. We also use it on Windows 10, and it all works well. It runs at first login and the ...
-1
votes
0answers
28 views

How can I tell if there is a prepared SQL Server install on a machine using PowerShell?

How can I check in PowerShell if the SQL Server install on a machine is just a prepared install (done before a sysprep) or a full ready to go instance?
0
votes
1answer
22 views

Running Net Stop unelevated

First of all, this is one of those borderline questions between serverfault and superuser. In the end, I decided it belonged here because of the fact that most aspects of it revolve around a domain ...
1
vote
1answer
31 views

PowerShell - Find out Who has Read permissions on a Network Folder Share

In a Windows Server & Active Directory environment, where a particular network-share is shared with only certain AD users/groups. Is there a way, using PowerShell, to find out who has read ...
1
vote
1answer
97 views

Writing a script to find what computer a user is logged into

So I want to specify a username and return the computer name. When I run this, it tells me that my $computers obj is null. Why would $computers = Get-ADComputer | where {$_.accountdisabled -eq $false}...
0
votes
2answers
38 views

Need ideas for ScheduledTask to copy file from CompA to CompB

So, I'm fairly locked down in my environment, but maybe there's still a way I haven't thought of to get this done... Need to have a flat file copied from Computer A to Computer B preferably by ...
1
vote
1answer
38 views

Granting a user permissions to PS Remote without allowing RDP

Is there a way I can grant a user the ability to use Invoke-Command in PowerShell remotely without giving them RDP Access to the server?
2
votes
0answers
57 views

How can one update BGP ASN on an Azure Virtual Network Gateway?

I have an existing Azure Virtual Network Gateway I'm attempting to reconfigure for use for BGP, per https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-bgp-resource-manager-ps/ . ...
1
vote
1answer
121 views

How to copy a file to network resources using UNC paths

I'm trying to do something pretty simple, and conceptually it should work, but it doesn't seem to, and I'm not sure why. I have a file I need to copy to multiple folders on multiple servers. I've been ...