PowerShell Get-HBA not available
Hi.I am looking to retrieve the HBA details via the Powershell command Get-HBAWin but this command is not available to select. Where can I get this command set?Thanks.
View ArticleTask Schedule Not Stoping in Windows Server 2008
Dears,I have ran windows powershell module script and I used task schedule in Windows Server 2008 to know who logon to the server, after I ran manually to test the script, the script keep sending me...
View ArticleHTML output
Hi I have a script that displays the power supply status Dn OperState Perf Thermal Voltage sys/chassis-1/psu-1 operable ok ok ok sys/chassis-1/psu-2 operable ok ok ok sys/chassis-1/psu-3 operable ok ok...
View ArticleScript to change sql server port is not working
Below is the script i have i am trying to change sql server port number using this but its doing nothing can anyone help me to fix this Plzparam ([string] $instance,$port) #$configParams = $args[0]...
View Article[POWERSHELL] Change File Attributes
Hi guys!!I have a folderwith some files,I do not know how manythey are, what is theirextension or attributes.I want tomake sure that, if a filehas among the attributes the hidden property(so it can...
View ArticleTest-Path of remote machines
Hey all. I have been studying Powershell for a little while now and I am just starting to get into scripting with it, both as a hobby and at work so please excuse any ignorance. I was asked to try and...
View ArticleInvoke-command very slow
Hello,I have a PS script with invoke-command.I must use credssp, because I check from remote server an network share, if there is available.This is my command: Invoke-Command -ComputerName...
View ArticleHow to get script to skip over machines that are offline?
I have an inventory script that I run against machines pulled from AD. The script works fine, but it is very slow at times if there are machines that are offline. If it runs against a few hundred...
View ArticleRun multiple commands using CMD with PowerShell.exe -command
I am trying to create a PowerShell command that reads a registy variable and then executes a command.It does this from the CMD command line. And the script runs under SYSTEM.I have the following...
View ArticleHelp! Powershell Remoting
I created a powershell (DBOff.ps1) script that shuts down my server database before it shutdowns my server (Windows 2008 R2). This script is held locally on the server itself and is fully functional....
View ArticleHow can I add multiple IPs to a 2012 server?
We have a web server that needs to have many IPs associated with it. Normally I'd go into adapter settings, TCP/IP Properties, Advanced, and then I'd click Add and enter the IP and subnet over and...
View ArticleReading & Controlling Capslock/Numlock state using powershell?
Is there any way to remotely read and change a machines NumLock / CapsLock state using powershell? From what I've read this can't be done using WMI, but it's something I'm definitely interested in, can...
View ArticleScriptable 'Update Driver' for network printer
Hi guys, this is a deployment issue I'm hoping to solve with some simple Powershell:When doing 32 bit Windows XP to 64 Bit Windows 7 migration, USMT is migrating all the network printers, which is...
View ArticleBatch Scripting For loop and Delayed Expansion
Hello, I am trying to write a simple (so I thought) batch file to take some IP's and tell me what is online. I want to give it an list of IP's, and have it return the...
View ArticleGet-ADUser in domain2
I logged on $domain1I got the following error when running Get-ADUser -Filter {samaccountname -eq $userid} -Server $domain2Get-ADUser : Unable to contact the server. This may be because this server...
View ArticleGet last logon user id on PC
(Get-WmiObject Win32_ComputerSystem -ComputerName $ip).UserName will return domain\logonID of the user who is currently logging on $ip. Is there simple way like above to return domain\logonID of the...
View ArticleRunning script on command line works fine, from remote it fails
Hi,I have a powershell script which runs just fine from the host command line. But I am using a monitoring system (Icinga) that can execute te script remotely with NRPE. Now when I run the script...
View Articlepassing multiple array of values as a argument in powershell script
I have to delete files and folders in different locations by using powershell script.Each environment have different number of archive locations (Dev -2 locations and QA-3 locations etc ) andNeed to...
View ArticleHow can I make a Powershell script ask the user for input before continuing
I have a powershell script I use to search for and restore deleted AD user accounts, this is needed more than you would expect because of the nature of the environment so I have decided to make it into...
View Article[POWERSHELL] Invoke-Expression
Hi guys!$Location= "C:\Test\Script" $Scripts=@("Temp.ps1","Empty.ps1","Report.ps1") foreach($Act in $Scripts){ $Dest=$Location,$Act -join('\') Invoke-Expression $Dest }I've wrote this script to execute...
View Article