What is the best way to detect stale machines using PowerShell and the QAD...
A little background: my agency is only at functional level 2003, so we need to use the Quest AD tools in Powershell to access stuff.I've been tasked to track down all computer objects in AD that are...
View ArticleRegular expression to split data from Text
Hi to all.I need help for extracting data from a string that I receive This is the data (Syslog data )time="2013-11-18 13:18:16" severity=major pri=2 fw=SOMEDATA id=SOMEDATA rule=100000 msg="Another...
View ArticleGetting NIC's Mac and IP information
Hi I am looking to get a MAC address and an IP address of the NIC's for the machines that are listed in the servers.txt file... I am able to get the IP information, but no luck adding the MAC info......
View ArticleHow to Check for Null Values in CSV File for Creating New-ADUsers Script?
I'm a bit new to this. I understand how the if statement works but can't understand how to best do this with all the parameters I have to check for. I'm already using an IF Else statement to check an...
View ArticleWindows Remoting between two workgroup servers
Is it possible to use powershell version 2.0 Windows Remoting between two servers that are in a workgroup, specifying the hostname rather than IP, without using the -credential parameter?As it stands...
View ArticleChang variable value in Function
I have $a defined in function a, $b defined in function b and $c defined in mainIn Functions, I can use $script:c to make change in $c. But I cannot use $script:a in Function b to make change in $aAny...
View Articlerun scheduler problem
I have setup a task scheduler job ( powershell batch job ) in windows 2012 , it works fine before , but it fail to run recently .I checked the scheduler event log , it shows this schedule job has been...
View ArticleZip files
HiHow to use powershell to search for html files within a folder(there are no other folders under this folder) and zip them?
View ArticleDelegate Report - 'System.OutOfMemoryException'
Using the script below to output publicdelegate and publicdelegatesbl attribute. The script is working fine but it is it using all the memory available and stops working after processing about 300...
View ArticleGetting the Primary Device for a number of users in Powershell.
I need to get the primary device for the members of a specific group using get-ADGroupMember and Get-CMUserDeviceAffinity. I have the AD module loaded in the SCCM Powershell console. Running each...
View ArticleAdding multiple aliases (Office 365)
Dear,I have the followingOffice 365environment:Tenant: Contoso.onmicrosoft.comMain Domain: contoso.comNumber ofusers: 600The company thatownsthistenant, has over47 domain, andwant eachuser hasan...
View ArticleRemote Windows Updates Query
I found this code and am wondering where I can add a variable or how to query a remote machine with the below (I would like to do it throughout the AD OU tree):#Get All Assigned updates in...
View ArticleInvoke Command
I am trying to use invoke command to run a .ps1 script that is located on a server to deploy software to a client machine. Here is my code:$s = new-pssession <computername>invoke-command -session...
View ArticleGet from AD all user information trough powershell and export to an FTP Server
Hello,I need to get all AD Users + all information ( like first name , last name , home path , email etc......)and than export it to a CSV file and than upload it to a FTP ServerHas anyone a idea of...
View ArticleCannot load hashtable from file.
Hi,I have a ps1 to export the hashtable as a file. Name Value ---- ----- G Green R Red...
View ArticleSetting Security Permissions on Shared folders
Hello,No bones about it, I am a newb and looking for an assist.I am working to create a PS script that will set share permissions for a roaming profile folder as per...
View ArticlePowershell start specific automatic services
Hello,I have some services that i first need to start and than stop again. But if those services are automatic it should start again.Can somebody help me with finding this script.It only needs to check...
View ArticleInfo about Out-File
Hi!recently, with the help of some guys in this forum, I managed towrite myfirst script.Now i want to improve this code :ConvertTo-HTML -head $head -PostContent...
View ArticlePowershell and robocopy find file name and extension
Hello,I am busy with making a script that will search for the latest file with a specific extension.After powershell found the file it needs to copy that file by using robocopy !I have made this...
View Articleupdate primary SMTP
Hi ,I wan to update around 500 primary smtp address of AD users so that they will update office 365 portal.My moto is if any users primary SMTP is different than what I wat to set then let script to...
View Article