-
I'd like to encourage script submitters to use the autohelp feature of PowerShell CTP3 when creating scripts. I've posted a full example at http://pshscripts.blogspot.com/2008/12/get-autohelpps1.html (and will shortly post this same script up here at PowerShell.Com). I intend to post the scripts...
-
I have a PowerShell job requiring the following parameters, which is normally run as "Set-Test.ps1 300 d:\scripts\test.txt -auto" from the command line. However,when using Start-Job (below) it fails to recognise the '-auto' parameter, alwaysreturning False; in fact the job fails to...
-
I have noticed that scripts containing the tags '<#' and '#>' to enclose .SYNOPSIS headers, etc, fail to show the correct highlighting if a single ' is enclosed, for example" ...this file uses today's date ..." will suspend any further highlighting after "'s...
-
I have a product installed in my environment called 'Citrix Xenapp Connector for SCCM 2007'. The installation creates a few scheduled tasks which run powershell scripts and use the new-pssession cmdlet. The tasks run under a domain account that has local admin rights on the server SCCM Site server...
Posted to
Ask Don Jones
(Forum)
by
garethb
on
01-12-2012
Filed under: scripts, scheduled task, PS Remoting, Server 2008 R2, new-pssession
-
Hi, I am trying to establish an implicit session with a remote host from my machine from a C# code. I am using runspace API for that. the code snippet is provided below Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); //constructing the vmname parameter here vmname = useralias ...
Posted to
Ask Don Jones
(Forum)
by
manishjha
on
01-18-2012
Filed under: Test-Connection, Args, Parameter, scripts, PS Remoting, new-pssession, WMI, Remote PowerShell
-
Hi Don, Thanks a lot for the prompt response! Yes, I stand corrected on this usage of 'implicit' remoting. Thanks for pointing that out. $s is treated as a PSSession object in the script as 'enter-PSSession' expects this object and not the string as the parameter. As for your last scenario...
Posted to
Ask Don Jones
(Forum)
by
manishjha
on
01-18-2012
Filed under: Parameter, scripts, Passing arguments from batch file to powershell, PS Remoting, new-pssession, WMI, Remote PowerShell
-
Hi, we have multiple DLs that we want to change the displayname to. for instanace our current display name says "yahoo users" and we want to create a simple shell to change/replace displayname "yahoo users" to "yahoo all mail users" I tried acheiving this through running...
-
If I type the unc path to the file I want to delete at the powershell console the file is deleted. If I try and pass the Remove-Item cmdlet a variable that contains the unc path it gives me the following error. Cannot find path '"\\server01\share$\DesktopProfile\user\Desktop\Music\delete song...
-
Hi is it possible to run an external command like telnet repeatedly from powershell? I need to telnet several servers and login automatically. i need to run something like this: $list = get-content c:\serverlist.txt foreach ($_ in $list) { start-process telnet -a $_ (this doesnt log me in with current...
-
Howdy, I am trying a new script that is hopefully easier than the last I tried. I have a server that performs actions to create, modify, and disable user accounts. I have a command that retrieves the list of users I need to report on and now I am not sure how to get to the next steps of creating this...