Questions tagged [powershell-v4.0]

67 questions
1
vote
1 answer

Powershell Array for Path

We are trying to break the following Path from the text file, the path is dynamic in length, i.e, it can be ABC\DSD\AAR\ARE or ABC\DSD. So we need a solution to break down the path as per the following…
1
vote
1 answer

Manual PowerShell DSC module installation

I am working on servers without access to the Internet. I am uploading DSC modules to the server, E.g. AccessControlDSC. The modules are being installed in c:\Program Files\WindowsPowerShell\Modules I unzip AccessControlDSC into the modules folder…
Brettski
  • 942
  • 3
  • 20
  • 31
1
vote
1 answer

How to execute "-NoNewWindow" parameter in powershell v4

I have used following command for my automation task. But it is throwing exception like below, parameter set cannot be resolved Command I used: Start-Process -FilePath powershell.exe -NoNewWindow -ArgumentList $code -verb RunAs How to run the…
Shankar
  • 219
  • 1
  • 4
  • 14
1
vote
1 answer

how to create Automatic install user based certificate from ADCS with script

We have a certificate server from which users are able to download their certificate (User Template) from this URL: http://localhost/certsrv. I now want to create a script which will do the following: Delete the existing certificate from Personal…
1
vote
0 answers

Why is HyperV Checkpoint-VM parameter SnapshotName ignored when Powershell remoting?

Having this code in powershell: $Servers = "computer.domain.com" # Open Session $Session = New-PSSession -ComputerName $Servers # Create Daily Checkpoints. Invoke-Command -Session $Session -ScriptBlock {Get-Vm * | Checkpoint-Vm -SnapshotName…
1
vote
1 answer

Passing list input to Get-ADComputer

SO I wrote a script that gets some information from AD about a user and their associated computer(s). I have read online about a few of the problems people face with the Get-ADComputer cmdlet and some possible bugs with it. At first I thought that…
1
vote
1 answer

Allow user to add Snap-In in Powershell on Windows Server 2012 RC2

I have a user that is used to run Powershell scripts, triggered by the Windows task scheduler on a Windows 2012RC2 server. The scripts use specific Snap-ins, which are added at the start of the script. The scripts fail and when I manually tried to…
1
vote
0 answers

Why does svn look for cached credentials in the wrong place when run as a scheduled task?

I run a daily Powershell script via Windows Scheduler under a service account that updates a local svn working copy and commits changes. The svn client is sliksvn and is run by command line only. When run manually, the Powershell script works as…
1
vote
0 answers

Repeatedly prompted to restart the computer when installing SQL Server 2008 R2 on a x64 Win 8.1 machine

I am trying to install SQL Server 2008 R2 on a Win 8.1 x64 bit machine. When running the installer, I get the Reboot Required check failing the install. I have tried rebooting, no difference. I have looked in the following registry location to…
1
vote
1 answer

How to receive email notification of non-AD joined DHCP leases?

This answer to theCleaner's question helped me some Windows DHCP Server - get notification when a non-AD joined device gets an IP address but the answer to his question involved Quest Poweshell cmdlets. I would like to achieve a solution with plain…
1
vote
1 answer

PowerShell script generates lots of warnings in Windows Event Log

I have a - rather complex - PowerShell script running on a Windows Server 2008 R2. When executing the script in the ISE or also in the console, everything runs fine. No errors or anything else that would stand out. However, in the Windows Event…
1
vote
1 answer

How does SCSM Relate Affected Users to Service Requests?

I'm using the built in SCSM cmdlets and the SMlets powershell module. I'm able to query Service Requests, but I can't seem to figure out how to get the Affected User of a given Service Request. I'm getting service requests in the following…
Colyn1337
  • 2,397
  • 2
  • 23
  • 40
1
vote
1 answer

Advanced function - Getting local security group members of computer objects

I'm trying to compile a list of groups that have access to a set of computers/servers in our organization, with regards to MSDN license reporting.. :-/ basing my work out of the Hey Scripting Guy's blog post on Local Group Membership:…
mdavidsen
  • 73
  • 8
1
vote
2 answers

"powershell has stopped working" on PS exit after creating IIS User

On a Windows Server 2012 box, I'm using PS to create a new IIS User (for automated deployments using MSDeploy). The command itself appears to work fine -- the user is created -- but as soon as I exit my PowerShell session (typing exit or just…
1
vote
1 answer

Why Get-SmbOpenFile losses the lock when file still opened at remote

I am using Get-SmbOpenFile, But surprisingly, it looses its connection and I can see that there is no lock even after couple of seconds later on the file any more, even it is still opened. I safely can remove that file on my server. Why, this can…