create a sufolder inside a directory if it doesnt exist
hi,am having a create a subfolder inside a directory, if doesnt exist. its called LOGS folder. And if it exists , i need to create .log files for each and every actions that's happening in the PS...
View ArticlePowershell- Can't set Textarea.
I'm looking at a web page with a text area:<textarea aria-label="Add comment" class="form-control" cols="0" maxlength="100000" name="text" rows="0" tabindex="0"...
View ArticleHow to automatically create an AD security group based on OU
Hello, based on powershell, how to automatically create an AD security group based on OU, windows server 2016 , thank you
View ArticleExpand columns new-object psobject
I am trying to get 3 variables out to a table but the columns are truncating. The variables are coming from two get-wmiobject cmds. I am building a table with:$out = new-object psobject $out |...
View Articlespecific user account in local admin group in all AD servers
Hi there,I need to provide a a list of which servers have one specific account in the Local Administrator group in all AD servers. After some research, it looks like Powershell can help me to get this...
View Articlepowershell output copied to other command in script
im trying to make a script that detects max free space on drive in bytes then copies the bytes number to other command spot before running 2nd command need the output bytes to be copied to...
View ArticlePowerShell FileWatcher (System.IO.FileSystemWatcher) is not executing the...
Hello Everyone,I tried with different options, and searched a lot of blogs to get more details on the execution of python script within powershell FileWatcher script. The powershell FileWatcher could...
View Articlestart-service -WarningAction : how to skip the warning and move on
hello, I am wishing to get some ideas on how to resolve the following issue. I need to scan the server OU and then check to see if the server has the healthservices server running. If it is not running...
View ArticleImport Functions selectively from a Module
In my powershell file First.ps1 i have a Function Sum. In the Second.psm1 module i have the Functions: Sum, Multiply. How to only Import Multiply into First.ps1. In the First.ps1:Import-Module...
View ArticleSet-Location in remote server - Error: Path not valid
Hi.I am trying to set a location using PowerShell in the remote server.I have tried the below code: $s = New-PSSession -ComputerName $ServerName Enter-PSSession -Session $s Set-Location 'C:'...
View ArticleHow can I create multiple Office 365 Groups from an XLS
Bonus question, is there somewhere that fully explains how to reference XLS files across PowerShell commands? Beginner here: I recently created about 20 Office 365 Groups using PowerShell ISE and this...
View Articleconvert comma separated value to number
Hi I'm trying to send data trough a webcall API and have to send a specific value as number. $groupmembers = Get-ADGroupMember -Identity $group.SamAccountName -Recursive $members = "" foreach ($member...
View ArticleExclude few sub folders while copying to remote server
Hi.I am trying to copy the folder and files from one server to another, based on a configuration xml.The source folder contains data as below:BackupBackup\folder1Backup\folder2Backup\folder3 .. like...
View ArticleSuppress output for Expand-Archive?
I'm using Expand-Archive to extract a zip file and it's writing all the extracted contents out to console, in exactly the same format as gci would (mode, lastWriteTime,length,name columns). Is there...
View ArticlePowershell to Disable "Protect from Accidental Deletion" on List of computers
Hello, I need some help please I used this script in a LAB environment with ADDS on WinServer 2012 R2 successfully. $Computers = get-content C:\Users\Administrator\Desktop\Servers.txt ForEach...
View ArticleDeployment package using Powershell to run in multiple servers
Hi .I am using a command line prompt, to install my application on multiple server, after logging into each server.what the existing script does is - Navigate to a specific path using command prompt...
View ArticlePowershell foreach but string gets cut off
Hello,I am writing a powershell script, that queries a table, brings back results, but i am doing a foreach so it can run a SQL command for each database. That part works fine, however when i look at...
View ArticleServer Uptime report and need to send mail using power shell
Hi SanjayPaul,I use your powershell server uptime script it is really nice, I try to reach you ask question through your post but no luck, So i want some modification in that script could you please...
View ArticleRemove element from XML
I have an XML file with this format <?xml version="1.0" encoding="utf-8"?><Locations> <Location> <Env>DEV</Env> <Name>Dev Test 1</Name>...
View ArticleAide pour la création d'un script pour automatiser la priorisation du réseau...
Bonjour,Je souhaiterais pouvoir scripter la priorisation du wifi par rapport aux connexion ethernet, pour se faire, je passe par les commandes get-netipinterface et set-netipinterface.Aujourd'hui je...
View Article