How to auto save output with date added to file name, and email the results?
Hi,We found a script to capture disk space usage, that automatically places the results into an Excel file. We would like the script to autosave this file to a specific directroy with the date ran as...
View ArticleUse PowerShell to Transfer data
Is it possible to use PowerShell to get a list of process and then apply it in a SQL server's database's table? If yes, how to do it? The data should be loaded once a day.
View ArticleDifferent Questions
1. What is the cons and pros to use PowerShell's workflow and function?2. What context should I use workflow or function in a situation?3. What is the purpose to use workflow and function?
View ArticleRepadmin /showrepl can't get all site DC
My DCDC-AD-DC is Site1-AD-DC is Site2-AD-DC is Site3-AD-DC is Site4-AD-DC is Site5-AD-DC is Site6when user log-in each authen via AD-DC at sitewhen i run below script on DC, report can't get...
View ArticleRe : Powershell does NOT return errorcode to CMD file thats invoking PS
Hello there,I am trying to return the exit code from PS back to CMD file that invokes the PS. Funny thing is PS does print exit code as 1 but CMD files still shows errorlevel as 0..... not sure what is...
View ArticleAdvanced Function Critique (and a parameter query)
I'm still pretty new to PowerShell, and I thought it was about time to try to create an advanced function.The example I have used is to return the 'LastLogon' across domain controllers, as it's pretty...
View ArticlePulling specific attributes to an outfile via Powershell
I am trying to export a list of our users with all the following attributes. I have been searching for hours and cant find anything that is exactly what I need and when I try to "blend" the PS...
View ArticleSpread Exchange mailboxes across databases (adaccount based)
Hi, i wrote (with a help of my mate) a macro which helps me to find missplaced mailboxes in our databases. The correct database is determined by username.The username is like"ANTON07" .. i took the...
View ArticlePowerShell to Get Duration of Network Connection
Hi, Is it possible to get the an idea on how to get the Duration of the network Adapter?I have tried couple of commands in PowerShell but none on them gives me the Duration.Any help?Thanks,
View Article"get-adcomputer -filter" works with a static entry but not the same from a...
I've been given a long list of computer IP addreses and I've been told to get the OU for each computer. I realized I can first use [System.Net.Dns]::GetHostEntry("192.168.1.1")to look up the hostname...
View ArticlePower Shell vs AutoIT
How does Power Shell compare to AutoIT in terms of:1. functionality2. complexity 3. learning curveCurrently my interest is for non-GUI functionality, especially for disk/folder/file management, PC...
View ArticlePowershell to list all computers and the complete OU path
I am trying to get a list of All Computers within the domain Prefixed UK and have it export the list to a CSV with the full OU Path.So far I can get the computers but not the OUGet-ADComputer -Filter...
View ArticlePowershell Setting Share Folder Permissions
I have a script that create a shared folder and I am trying to set permissions. Here is what I have so far:$serverName = "myfileserver"$folderName = "d:\Personal"$shareName = $newSAM+"$"$fullName =...
View ArticleUse DNS Cmdlets on Windows Server 2008 R2
I want to use the DNS Cmdlets (http://technet.microsoft.com/en-us/library/jj649850.aspx) on a Windows Server 2008 R2 I learned that they are shipped with PS v3. So I installed all prerequisites and...
View ArticleDSC problem: no .mof file created
I try to create a .mof file to test DSC on a Windows server 2012 R2 server.I think I installed all the requred components (where can I locate a complete list?) and I can create .ps1 files or paste...
View Article$PSCommandPath is $null in parameters section and during debugging
Hello, I'm trying to figure out how to find out where my script is located at the time of execution and from what I researched so far it seems to have been a problem with PS for sometime. I'm running...
View Articlerestart and sesume
Hey,I have several scripts that have to run back to back for setting up an domain-server 2012 R2. I'm using Powershell 3.The first script is:Resize-Partition -DiskNumber 0 -PartitionNumber 2 -size...
View Articleweb test result for a URL which needs a client certificate to authenticate
Hi, we want to check URL response of a .asmx URL which needs a client certificate for authenticating. I got the cert object and then passed it to invoke-webrequest cmdlet, but no matter what i try I...
View ArticleRun invoke-command on multiple machines at the same time
Hey all so I read that if I store my New-pssession in a variable then used that in my invoke-command it would run all computers at the same time.$a = Get-Content "C:\Users\cody-horton\Desktop\list.txt"...
View ArticleVery Urgent::::Please share Power shell command to remove SIP address for...
Hi Everyone, Please share Power shell command to remove SIP address for multiple user. like i used below command to add SIP address: Get-QADUser user name | Add-qadproxyaddress -customtype 'sip'...
View Article