Object Type Problem
The following is a small part of code from a larger script. I have the following: $OldGroups = @("user_one", "user_two", "aaaaxx_11000")foreach ($group in $OldGroups) { $new_var += "`"" $new_var...
View ArticleScript to monitor free space on mapped logical disk.
That script works correctly: "$mythreshold = 1000GB$computerName = "mycomputer.domain.com" Get-WmiObject -class "win32_mappedlogicaldisk" -namespace "root\CIMV2" -computername "$computerName" |...
View ArticleSQL Query help
Guys, I have the following query which runs successfully inside SQL Management Studio. I would like to be able to use powershell to loop through a list of users and run this query per user (using...
View ArticleSubmitng a Cosmos Scope Job
I am receiving the following error:"Cannot bind parameter 'VcPercentAllocation'. Cannot convert value "vc://cosmos09/ipe.platform.dsi" to type "System.Int32". Error: "Input string was not in a correct...
View ArticleGiving the average of two numbers and then repeating the question.
I'm new to powershell and trying to figure out how too prompt me with two questions of a dollar amount. Then return the average of the two dollar amounts. Then repeat the process as many times Till I'm...
View ArticleHotFix
i have script to find HOTFIX and its working fine .i have all host name in Listofcomputer.txt when i run this command its gives detail as .i want one more colum name Generated for (host name )...
View ArticleSQL query help (cross-posted in GENERAL)
Guys,I have the following query which runs successfully inside SQL Management Studio. I would like to be able to use powershell to loop through a list of users and run this query per user (using...
View ArticleCalling of the Powershell functions
Hi,While I am calling the function:function get-localadmin { param ($strcomputer) $admins = Gwmi win32_groupuser –computer $strcomputer $admins = $admins |? {$_.groupcomponent –like...
View ArticleA question regarding the ADD method of Type...
HelloCan someone please help me the following qustion please.using the above class/type I can get an SSL certificate from one computer and add to the x509 store to another computer like so...
View ArticleWindows Azure SDK 2.1 with VS 2013, VM, Notification Hub, Cloud Services,...
Microsoft has released Windows Azure SDK 2.1 for .NET with support for VM Image including enhancements for Visual Studio Server Explorer, virtual machines, cloud services. It also includes service bus...
View ArticleFAQ: Learning PowerShell tips to automate tasks and free up your time
With 2,300 cmdlets and counting, PowerShell can automate a lot of tasks and free up valuable time for admins. But as admins begin to tackle learning PowerShell, lots of questions come up about specific...
View ArticleNew book: Windows PowerShell 3.0 First Steps
Automate Windows administration tasks with ease by learning the fundamentals of Windows PowerShell 3.0.Get started with this powerful Windows administration toolAutomate Windows administration tasks...
View ArticleTop 10 Tips for Using PowerShell ISE
If you’re just getting started with PowerShell, chances are you’ll be doing your work in the Integrated Scripting Environment (ISE). Although there are many third-party products that improve upon the...
View ArticlePowerShell cmdlets ease SharePoint 2013 backup
SharePoint administrators have long used the STSADM utility as a tool for performing command-line backups of SharePoint site collections. However, Microsoft is phasing out legacy command-line tools in...
View ArticleHow to get information about inactive cluster node
Hello,I need your help. I have 2-nodes cluster 2008.How go the name of inactive (standby, not current cluster owner) cluster node in powershell. Regardsppiesio
View ArticleSimple ? on how to construct an output file with current date in it
Afternoon, I have a ps script I just crafted that will recursively delete BAK files from a parent and child folders of said parent. Works like a champ. I cannot seem to get the easy part of outputting...
View ArticleOuput CSV format
I have a script with outputs data regarding Citrix Applications$header = "Application,Count"$outFile = "c:\CitrixCount\apps.csv"Set-Content -Path $outFile -Value $header -Encoding Ascii$applist =...
View ArticleVBScript to Power shell
Not sure how to translate this vbscript into a working Power Shell script. rules = oSite.GetIPAccessRules()For Each key In rulesIf key.type = 0 ThenWScript.echo "AutoBan"autoban = key.BannedIPsFor...
View ArticleRead File then Search OU's
I'm using the Quest PowerShell tools. But this code works perfect. $Inactive_computer_OU = 'OU=InactiveComputers,DC=Acme,DC=com'$sourceOU = 'Acme.com/FirmComputers'Set-QADPSSnapinSettings...
View ArticleIT Guide to Windows 8.1: Windows PowerShell 4.0 CMDLets
PowerShell is…uh…powerful. But, despite its powerful, able to leap tall buildings at a single bound, abilities, there are many IT Pros that haven't even run a single line of code. I've heard things...
View Article