This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Unassign all users mappings from a specific pool | |
.Details required to run the script | |
1) Enter the Portal URL for $tenanturl | |
2) Enter Credentials information in $ADCredentials section which need below inputs | |
3) You will get a prompt to input pool id of the vm's | |
.Limitations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
find the clusters are not in ready state | |
.Note | |
Copy the vcenter names into a text file named "vcenter" and place it into C:\temp before executing the script | |
#> | |
Get-Module -listavailable *vm*|Import-Module | |
Get-Module -listavailable *nsx*|Import-Module | |
$cred=Get-Credential | |
$redColor = "#FF0000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
VM to User mapping Powershell Script | |
.Details required to run the script | |
1) Enter the Portal URL for $tenanturl | |
2) Enter the Domain Name for $Domain | |
3) Change the Path of CSV file in $csvfile | |
4) Enter Credentials information in $ADCredentials section which need below inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Helps in increasing the IP based on the input | |
$IP="10.1.2.3" | |
$split=$IP.Split(".",4) | Select -Index 3 | |
[int]$lastpart=$split | |
$ipnew=($ip.split(".",4)|select -index 0,1,2) -join "." | |
$add=$lastpart+25 | |
$ip25th=$IPnew +"." +$add | |
Write-Output "$ip25th" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module Active* | |
$userdata=get-content c:\temp\useraccounts.txt | |
foreach($user in $userdata) | |
{ | |
try | |
{ | |
$Disabled=(Get-ADUser -Identity $user).Enabled | |
if($Disabled -match "False") | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import vmware powershell modules | |
Get-Module *vm*|import-module | |
#Connect to vCenter | |
connect-viserver vcentername.thecloudwiki.com -ea silentlycontinue | |
#Get the VM details | |
$vm=(Get-View -ViewType "Virtualmachine" -Filter @{"Runtime.PowerState" ="poweredOn";"Config.GuestFullName"=".*windows*.*"}).name | |
$percentWarning = 15; | |
$percentWarning = 15; | |
$percentCritcal = 10; | |
$percent50 = 50; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This script can be used to to clear un used space of C:\ in windows servers | |
#once the task is completed it will send a mail to the added in $msg.To.Add | |
#please update your own smtp server address | |
#enter the servers suppose to release un-used space in 123.txt file (ex--c:\temp\123.txt) | |
#Create a folder named Cleanupreports in C:\temp | |
#Script assumes delprof is already installd in all the servers | |
$Path = "C:\temp\Cleanupreports\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$r="Running" | |
$servers=get-content "C:\temp\SCCM\servers.txt" | |
$Name = "SCCM_Serv.html" | |
$report = "C:\temp\SCCM\" + $Name | |
$header = " | |
<html> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
This script will check SCCM client status,version & sitecode. | |
If the site code is not cloudwiki1 it will assign/change to cloudwiki1 | |
#> | |
Start-Transcript c:\temp\versionlog.txt | |
$r="Running" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Module -ListAvailable *vm*|Import-Module | |
$cred=Get-Credential | |
Connect-VIServer vcenter02 -Credential $cred | |
$deletevmlist=Get-Content C:\temp\delete.txt | |
foreach($deletevm in $deletevmlist) | |
{ | |
write-output ("$deletevm is deleting...") | |
get-cluster cluster02|get-vm $deletevm |Remove-VM -DeletePermanently -Confirm:$false -RunAsync| out-null | |
Start-Sleep 10 | |
} |
NewerOlder